File Library Replaces Document Folder
- Clients - Windows 7
- Servers - Windows Server 2008 R2
- Severity - Medium
- Frequency - High
Libraries provide a centralized folder-like experience for file storage, search, and access across multiple locations, both local and remote.
The default locations used by common file dialogs (for example, Open, and Save) have been changed from the Document Folder to the Documents Library. The User Interface is unchanged, but the user will now be able to view, browse, and search the Library using various arrangement views. Files will be saved into the Library default save location unless the user changes the default save location or chooses a different folder.
Developers could create their own libraries or add locations to existing libraries using the IShellLibrary interface. Users can find libraries by using the Known Folder system (for example, FOLDERID_DocumentsLibrary).
The Library is itself a file, and not a folder. Therefore, path manipulations could result errors due to the attempt by the application to concatenate files to files.
When using IFileDialog, you must use GetResult method instead of combination of GetFolder and GetFilename as you would in the previous operating system versions. Use the Shell APIs where possible to interact with and manipulate items in the Shell Namespace (for example, IShellItem).
If you want to create your own libraries or add locations to existing libraries, you must use IShellLibrary API. Libraries are themselves Shell Folders so you can enumerate them just like any other Shell Folder.
Using the common file dialog will ensure that users can save directly to their libraries.
- Windows Libraries: http://msdn.microsoft.com/en-us/library/dd758096(VS.85).aspx
- Keeping in sync with a library: http://msdn.microsoft.com/en-us/library/dd758094(VS.85).aspx#library_keeping_in_sync