问题
FolderInformation's methods/properties are nearly the same with StorageFolder's.
I can't figure out why WinRT api provides FolderInformation and StorageFolder as well. If I assign the list created from FileInformationFactory.GetFoldersAsync() to an ItemsControl, does it differ from the listed created from StorageFolder.CreateFolderAsync() ?
The document says the FolderInformation provides synchronous access, but I don't know when the issue would happen.
The one drawback I found in FolderInformation is it could only be created from FileInformationFactory. So I think it's impossible to create a FolderInformation for the KnownFolders.PicturesLibrary.
回答1:
FolderInformation lets you act on the Folder itself (as in move it, delete it, rename it etc.) http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.bulkaccess.folderinformation.aspx
Whereas StorageFolder lets you act on the contents of the folder (as in create a new file in the folder, create a new sub-folder in the folder, get all the files from the folder etc.) http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.storagefolder.aspx
来源:https://stackoverflow.com/questions/13944488/in-metro-whats-the-difference-between-folderinformation-and-storagefolder