Windows Dev Center

Collapse the table of content
Expand the table of content
Expand Minimize
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

StorageFolder.Path | path property

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 (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

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