фабрика Path::Path.fromNative

Создает новый путь на основе строки и с учетом системных особенностей

Синтаксис

new
Path.Path.fromNative
(String source)

Передаваемые параметры

String source

Описание

/** * Creates a Path from a String that uses the native filesystem's conventions. * * On Windows, this converts '\' to '/' and has special handling for drive * letters and shares. * * If the path contains a drive letter a '/' is added before the drive letter. * * new Path.fromNative(r'c:\a\b').toString() == '/c:/a/b' * * A path starting with '/c:/' (or any other character instead of 'c') is * treated specially. Backwards links ('..') cannot cancel the drive letter. * * If the path is a share path this is recorded in the Path object and * maintained in operations on the Path object. * * var share = new Path.fromNative(r'\\share\a\b\c'); * share.isWindowsShare == true * share.toString() == '/share/a/b/c' * share.toNativePath() == r'\\share\a\b\c' * share.append('final').isWindowsShare == true */

Официальная документация (английский)