writablePath

Get writable path for specific location.

Parameters

type StandardPath

Location to lookup.

params FolderFlag

Union of FolderFlags. Note: This function does not cache its results.

Return Value

Type: string

Path where files of $(U type) should be written to by current user, or an empty string if could not determine path.

Examples

string downloadsDir = writablePath(StandardPath.downloads, FolderFlag.verify);
if (downloadsDir.length) {
    //Open file dialog with this directory.
} else {
    //Could not detect default downloads directory.
    //Ask user to choose default downloads directory for this application.
}

See Also

Meta