DocumentsFolder Function
Used to access the user's Documents folder.
Syntax
result = DocumentsFolder
Notes
The DocumentsFolder function provides a way to access the Documents folder that will work under different language systems and all platforms. The SpecialFolder module contains many functions that return special folders managed by the OS.
Windows
On Windows XP, a call to DocumentsFolder returns the My Documents folder in the current user's directory, e.g., C:\Documents and Settings\username\My Documents.
Macintosh
On Macintosh, it returns the Documents folder for the current user.
Linux
On Linux, DocumentsFolder tries to get the directory "Documents" in the logged-in user's Home directory. If this directory does not exist, it returns a FolderItem to the user's Home directory.
The SpecialFolder module enables you to access many special folders that are managed by the OS.
Examples
This example displays the absolute path to the Documents folder.
f=DocumentsFolder
If f <> Nil then
MsgBox f.AbsolutePath
Else
MsgBox "The item does not exist!"
End if
See Also
ApplicationSupportFolder, DesktopFolder, FontsFolder, PreferencesFolder, ShutDownItemsFolder, StartupItemsFolder, SystemFolder, TemporaryFolder, TrashFolder, SpecialFolder functions.