fsPath property

String get fsPath

The string representing the corresponding file system path of this Uri.

Will handle UNC paths and normalize windows drive letters to lower-case. Also uses the platform specific path separator.

  • Will not validate the path for invalid characters and semantics.
  • Will not look at the scheme of this Uri.
  • The resulting string shall not be used for display purposes but for disk operations, like readFile et al.

The difference to the {@linkcode Uri.pathpath}-property is the use of the platform specific path separator and the handling of UNC paths. The sample below outlines the difference:

const u = URI.parse('file://server/c$/folder/file.txt')
u.authority === 'server'
u.path === '/shares/c$/file.txt'
u.fsPath === '\\server\c$\folder\file.txt'

Implementation

_i2.String get fsPath => _i5.getProperty(
      this,
      'fsPath',
    );