Expand Minimize

StorageFolder.Path | path property

Applies to Windows and Windows Phone

Gets the full path of the current folder in the file system, if the path is available.

Syntax


var path = storageFolder.path;

Property value

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The full path of the current folder in the file system, if the path is available.

Remarks

Don't rely on this property to access a folder, because a file system path is not available for some folders. For example, in the following cases, the folder may not have a file system path, or the file system path may not be available.

  • The folder represents a container for a group of files (for example, the return value from some overloads of the GetFoldersAsync method) instead of an actual folder in the file system.
  • The folder is backed by a URI.
  • The folder was picked by using a file picker.

The Path property is also supported in desktop apps.

Examples

The following example gets the app's installation folder and displays the value of the folder's Path.


/ Get the app's installation folder.
var appFolder = Windows.ApplicationModel.Package.current.installedLocation;

// Print the folder's path to the Visual Studio Output window.
console.log(appFolder.name, "folder path:", appFolder.path);

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

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

Metadata

Windows.winmd

See also

StorageFolder

 

 

Show:
© 2015 Microsoft