이 페이지에서

StandardPaths QML Type

표준 시스템 경로에 대한 액세스를 제공합니다. 더 보기...

Import Statement: import QtCore
Since: Qt 6.2
Inherits:

QtObject

메서드

상세 설명

StandardPaths 싱글톤 타입은 표준 시스템 경로를 조회하는 메서드를 제공합니다.

property url documentsFolder: StandardPaths.writableLocation(StandardPaths.DocumentsLocation)

QStandardPaths도 참조하십시오 .

메서드 문서

string displayName(StandardLocation type)

지정된 위치 type 에 대한 현지화된 표시 이름을 반환하거나, 관련 위치를 찾을 수 없는 경우 빈 QString 를 반환합니다.

QStandardPaths::displayName()도 참조하십시오 .

url findExecutable(string executableName, list<string> paths)

지정된 paths 경로에서 executableName 라는 실행 파일을 찾거나, paths 가 비어 있는 경우 시스템 경로에서 찾습니다.

대부분의 운영 체제에서 시스템 경로는 PATH 환경 변수에 의해 결정됩니다. 실행 파일을 검색할 디렉터리는 paths 인자로 설정할 수 있습니다. 사용자 지정 경로와 시스템 경로 모두에서 검색하려면, `paths`를 설정했을 때와 비워두었을 때 각각 한 번씩, 총 두 번 `findExecutable`을 호출하십시오. 호출 시 사용된 이름에 따라 동작이 달라지는 실행 파일의 경우, 기존 동작을 유지하기 위해 심볼릭 링크는 해결되지 않습니다.

참고: Windows에서는 일반적인 실행 파일 확장자(PATHEXT 환경 변수에 정의된 것)가 자동으로 추가됩니다. 예를 들어, findExecutable("foo") 호출은 foo.exe 또는 foo.bat 가 존재할 경우 이를 찾아냅니다.

실행 파일의 절대 파일 경로를 반환하며, 찾을 수 없는 경우 빈 문자열을 반환합니다.

주어진 executableName 가 실행 파일을 가리키는 절대 경로인 경우, 해당 파일의 클린 경로가 반환됩니다.

QStandardPaths::findExecutable()도 참조하십시오 .

url locate(StandardLocation type, string fileName, LocateOptions options)

type 의 표준 위치에서 ‘ fileName ’라는 이름의 파일 또는 디렉터리를 찾습니다.

options 플래그를 사용하면 파일이나 디렉터리를 검색할지 여부를 지정할 수 있습니다. 기본적으로 이 플래그는 LocateFile 로 설정되어 있습니다.

찾은 첫 번째 파일 또는 디렉터리의 절대 경로를 반환하며, 그렇지 않은 경우 빈 문자열을 반환합니다.

QStandardPaths::locate()도 참조하십시오 .

list<url> locateAll(StandardLocation type, string fileName, LocateOptions options)

type 의 표준 위치에서 ‘ fileName ’라는 이름의 모든 파일 또는 디렉터리를 찾습니다.

options 플래그를 사용하면 파일이나 디렉터리를 검색할지 여부를 지정할 수 있습니다. 기본적으로 이 플래그는 LocateFile 로 설정되어 있습니다.

찾아낸 모든 파일의 목록을 반환합니다.

QStandardPaths::locateAll()도 참조하십시오 .

list<url> standardLocations(StandardLocation type)

type 에 해당하는 파일이 포함된 모든 디렉터리를 반환합니다.

디렉터리 목록은 우선순위가 높은 순서대로 정렬되며, writableLocation()을 확인할 수 있는 경우 이를 먼저 나열합니다. 해당 유형에 대한 위치가 정의되어 있지 않으면 이 목록은 비어 있습니다.

QStandardPaths::standardLocations()도 참조하십시오 .

url writableLocation(StandardLocation type)

type 의 파일이 기록되어야 할 디렉터리를 반환하며, 위치를 확인할 수 없는 경우에는 빈 문자열을 반환합니다.

참고: 반환된 저장위치는 존재하지 않을 수 있습니다. 즉, 시스템이나 사용자가 해당 위치를 생성해야 할 수도 있습니다.

QStandardPaths::writableLocation()도 참조하십시오 .

© 2026 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.