정보
요청한 주제가 아래에 표시됩니다. 그러나 이 주제는 이 라이브러리에 포함되지 않습니다.
이 항목은 아직 평가되지 않았습니다.- 이 항목 평가

StorageFolder Class

폴더와 그 내용을 조작하고 정보를 제공합니다.

구문


public ref class StorageFolder sealed : IStorageFolder,
    IStorageItem,
    IStorageFolderQueryOperations,
    IStorageItemProperties,
    IStorageItemProperties2,
    IStorageItem2,
    IStorageFolder2,
    IStorageItemPropertiesWithProvider

특성

[Version(0x06020000)]

구성원

StorageFolder클래스에는 다음과 같은 유형의 구성원이 있습니다.

메서드

The StorageFolder 클래스 다음 메서드가 있습니다. C#, Visual Basic 및 C++에서는 다음에서 메서드를 상속합니다. Object 클래스.

메서드설명
AreQueryOptionsSupported Determines whether the current folder supports the specified QueryOptions.
CreateFileAsync(String) Creates a new file in the folder or file group.
CreateFileAsync(String, CreationCollisionOption) Creates a new file in the current folder, and specifies what to do if a file with the same name already exists in the current folder.
CreateFileQuery() Creates a query result object to filter and enumerate top-level files in the current folder.
CreateFileQuery(CommonFileQuery) Creates a query result object to filter and enumerate all the files in the current folder and its subfolders. Files are filtered and sorted based on the specified CommonFileQuery.
CreateFileQueryWithOptions Creates a query result object to filter and enumerate the files in the current folder and its subfolders. Files are included in the query result and sorted based on the specified QueryOptions.
CreateFolderAsync(String) Creates a new subfolder inside the current folder.
CreateFolderAsync(String, CreationCollisionOption) Creates a new sub-folder inside the current folder, and specifies what to do if a folder with the same name already exists in the current folder.
CreateFolderQuery() Creates a query result object to filter and enumerate top-level sub-folders of the current folder.
CreateFolderQuery(CommonFolderQuery) Creates a query result object to enumerate files in the current folder by grouping them into StorageFolder objects. Files are filtered and grouped based on the specified CommonFolderQuery.
CreateFolderQueryWithOptions Creates a query result object to filter and enumerate files in the current folder by grouping them into sub-folders. Files are included in the query result and grouped into sub-folders based on the specified QueryOptions.
CreateItemQuery Creates a query result object to filter and enumerate top-level items (files and sub-folders) in the current folder.
CreateItemQueryWithOptions Creates a query result object to filter and enumerate top-level items (files and sub-folders) in the current folder. Items are included in the query result and sorted based on the specified QueryOptions.
DeleteAsync() Deletes the current folder or file group.
DeleteAsync(StorageDeleteOption) Deletes the current folder or file group, optionally deleting it permanently.
GetBasicPropertiesAsync Gets the basic properties of the current folder or file group.
GetFileAsync Gets a single file from the current folder using the specified file name.
GetFilesAsync() Gets the top-level files in the current folder.
GetFilesAsync(CommonFileQuery) Gets a list of all files in the current folder and its sub-folders. Files are filtered and sorted based on the specified CommonFileQuery.
GetFilesAsync(CommonFileQuery, UInt32, UInt32) Gets an index-based range of files from the list of all files in the current the current folder and its sub-folders. Files are filtered and sorted based on the specified CommonFileQuery and are included in the range based on the resulting indexes.
GetFolderAsync Gets a single sub-folder from the current folder using the specified folder name.
GetFolderFromPathAsync Gets a StorageFolder that represents the folder at the specified file-system path.
GetFoldersAsync() Gets a list of the top-level sub-folders of the current folder.
GetFoldersAsync(CommonFolderQuery) Gets a list of StorageFolder objects that represent groups of files in the current folder. Files are filtered and grouped based on the specified CommonFolderQuery.
GetFoldersAsync(CommonFolderQuery, UInt32, UInt32) Gets an index-based range of StorageFolder objects that represent groups of files in the current folder. Files are filtered and grouped based on the specified CommonFolderQuery and are included in the range based on the resulting indexes.
GetIndexedStateAsync Gets the indexed state of the current folder.
GetItemAsync Gets a single file or sub-folder from the current folder using the name of the item.
GetItemsAsync() Gets a list of top-level files and sub-folders inside the current folder.
GetItemsAsync(UInt32, UInt32) Gets an index-based range from a list of all the files and sub-folders inside the current folder. Items in the range based on the resulting indexes.
GetParentAsync Gets the parent folder of the current folder.
GetScaledImageAsThumbnailAsync(ThumbnailMode) Gets a scaled image as a thumbnail, determined by the purpose of the thumbnail.
GetScaledImageAsThumbnailAsync(ThumbnailMode, UInt32) Gets a scaled image as a thumbnail, determined by the purpose of the thumbnail and the requested size.
GetScaledImageAsThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions) Gets a scaled image as a thumbnail, determined by the purpose of the thumbnail, the requested size, and the specified options
GetThumbnailAsync(ThumbnailMode) Gets an adjusted thumbnail image for the current folder, determined by the specified purpose of the thumbnail.
GetThumbnailAsync(ThumbnailMode, UInt32) Gets an adjusted thumbnail image for the current folder, determined by the specified purpose of the thumbnail and the requested size.
GetThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions) Gets an adjusted thumbnail image for the current folder, determined by the specified purpose of the thumbnail, the requested size, and the specified options.
IsCommonFileQuerySupported Indicates whether the current folder supports the specified CommonFileQuery.
IsCommonFolderQuerySupported Indicates whether the current folder supports the specified CommonFolderQuery.
IsEqual Indicates whether the current folder is equal to the specified folder.
IsOfType Indicates whether the current StorageFolder matches the specified StorageItemTypes value.
RenameAsync(String) Renames the current folder.
RenameAsync(String, NameCollisionOption) Renames the current folder and specifies what to do if a folder with the same name already exists.
TryGetItemAsync Try to get a single file or sub-folder from the current folder by using the name of the item.

 

속성

StorageFolder클래스 다음 속성이 있습니다.

속성액세스 유형설명

Attributes

읽기 전용Gets the attributes of the current folder.

DateCreated

읽기 전용Gets the date and time that the current folder was created.

DisplayName

읽기 전용Gets the user-friendly name of the current folder.

DisplayType

읽기 전용Gets the user-friendly type of the folder or file group.

FolderRelativeId

읽기 전용Gets an identifier for the current folder. This ID is unique for the query result or StorageFolder that contains the current folder or file group, and can be used to distinguish between items that have the same name.

Name

읽기 전용Gets the name of the current folder.

Path

읽기 전용Gets the full file-system path of the current folder, if the folder has a path.

Properties

읽기 전용Gets an object that provides access to the content-related properties of the current folder.

Provider

읽기 전용Gets the StorageProvider object that contains info about the service that stores the current folder.

 

설명

일반적으로 비동기 메서드 및/또는 함수 호출의 결과로 StorageFolder 개체에 액세스합니다. 예를 들어 정적 메서드인 GetFolderFromPathAsync는 지정된 폴더를 나타내는 StorageFolder를 반환합니다.

또한 사용자가 폴더를 선택하도록 파일 선택기를 호출할 때마다 파일 선택기는 폴더를 StorageFolder로 반환합니다.

예제

이 예제에서는 사용자가 선택한 파일을 캡처하고 처리하기 위해 FolderPicker.PickSingleFolderAsync를 사용하여 파일 선택기를 호출하는 방법을 보여 줍니다.

현재 사용할 수 있는 코드 예가 없거나 이 언어가 지원되지 않습니다.

PickSingleFileAsync가 완료된 후 folder는 선택된 파일을 StorageFolder로 가져옵니다.

이 예제에서 folderPicker에는 FolderPicker 개체가 포함되어 있습니다. 파일 선택기를 사용하는 방법에 대한 자세한 내용은 FolderPicker빠른 시작: 파일 선택기로 파일에 액세스를 참조하십시오.

또한 folderTokenFutureAccessList에서 폴더를 검색하는 데 사용할 수 있는 식별자를 가져옵니다. 나중에 다시 액세스할 수 있도록 파일과 폴더를 저장하는 방법에 대한 자세한 내용은 FutureAccessList, MostRecentlyUsedList최근에 사용한 파일과 폴더를 추적하는 방법을 참조하십시오.

요구 사항

지원되는 최소 클라이언트

Windows 8 [Windows 스토어 앱 전용]

지원되는 최소 서버

Windows Server 2012 [Windows 스토어 앱 전용]

지원되는 최소 전화

Windows Phone 8

네임스페이스

Windows.Storage
Windows::Storage [C++]

메타데이터

Windows.winmd

Capabilities

picturesLibrary
videosLibrary
musicLibrary
documentsLibrary

참고 항목

StorageFile

 

 

이 정보가 도움이 되었습니까?
(1500자 남음)
의견을 주셔서 감사합니다.
표시:
© 2014 Microsoft. All rights reserved.