StandardPaths QML Type
표준 시스템 경로에 대한 액세스를 제공합니다. 자세히...
Import Statement: | import QtCore |
Since: | Qt 6.2 |
Inherits: |
메서드
- string displayName(StandardLocation type)
- url findExecutable(string executableName, list<string> paths)
- url locate(StandardLocation type, string fileName, LocateOptions options)
- list<url> locateAll(StandardLocation type, string fileName, LocateOptions options)
- list<url> standardLocations(StandardLocation type)
- url writableLocation(StandardLocation type)
상세 설명
표준 경로 싱글톤 유형은 표준 시스템 경로를 쿼리하는 메서드를 제공합니다.
property url documentsFolder: StandardPaths.writableLocation(StandardPaths.DocumentsLocation)
QStandardPaths 를참조하세요 .
메서드 문서
string displayName(StandardLocation type) |
지정된 위치의 지역화된 표시 이름 type 또는 관련 위치를 찾을 수 없는 경우 빈 QString 을 반환합니다.
QStandardPaths::displayName()도 참조하세요 .
지정된 paths 또는 paths 이 비어 있는 경우 시스템 경로에서 executableName 이라는 이름의 실행 파일을 찾습니다.
대부분의 운영 체제에서 시스템 경로는 PATH
환경 변수에 의해 결정됩니다. 실행 파일을 검색할 디렉터리는 경로 인수로 설정할 수 있습니다. 사용자 경로와 시스템 경로 모두에서 검색하려면 경로가 설정된 상태에서 한 번, 경로가 비어 있는 상태에서 한 번씩 findExecutable을 두 번 호출합니다. 심볼릭 링크는 호출되는 이름에 따라 동작이 달라지는 실행 파일의 경우 동작을 보존하기 위해 확인되지 않습니다.
참고: Windows에서는 일반적인 실행 파일 확장자(PATHEXT 환경 변수에서)가 자동으로 추가됩니다. 예를 들어, findExecutable("foo") 호출은 foo.exe
또는 foo.bat
(있는 경우)을 찾습니다.
실행 파일의 절대 파일 경로를 반환하거나 찾을 수 없는 경우 빈 문자열을 반환합니다.
주어진 executableName 이 실행 파일을 가리키는 절대 경로인 경우 깨끗한 경로가 반환됩니다.
QStandardPaths::findExecutable()도 참조하세요 .
type 의 표준 위치에서 fileName 라는 파일 또는 디렉터리를 찾습니다.
options 플래그를 사용하면 파일 또는 디렉터리를 찾을지 여부를 지정할 수 있습니다. 기본적으로 이 플래그는 LocateFile
로 설정되어 있습니다.
처음 찾은 파일 또는 디렉터리의 절대 경로를 반환하고, 그렇지 않으면 빈 문자열을 반환합니다.
QStandardPaths::locate()도 참조하세요 .
type 의 표준 위치에서 fileName 이라는 이름의 모든 파일 또는 디렉터리를 찾습니다.
options 플래그를 사용하면 파일 또는 디렉터리를 찾을지 여부를 지정할 수 있습니다. 기본적으로 이 플래그는 LocateFile
로 설정되어 있습니다.
찾은 모든 파일 목록을 반환합니다.
QStandardPaths::locateAll()도 참조하세요 .
type 파일이 속해 있는 모든 디렉터리를 반환합니다.
디렉터리 목록은 우선순위가 높은 것부터 낮은 것 순으로 정렬되며, writableLocation()부터 시작하여 확인할 수 있는 경우 우선순위가 낮은 순으로 정렬됩니다. 유형에 대한 위치가 정의되지 않은 경우 이 목록은 비어 있습니다.
QStandardPaths::standardLocations()도 참조하세요 .
url writableLocation(StandardLocation type) |
type 파일이 기록되어야 하는 디렉터리를 반환하거나 위치를 확인할 수 없는 경우 빈 문자열을 반환합니다.
참고: 반환된 저장 위치는 존재하지 않을 수도 있습니다. 즉, 시스템이나 사용자가 만들어야 할 수도 있습니다.
QStandardPaths::writableLocation()도 참조하세요 .
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.