Link class

Link objects are references to filesystem links.

Link objects are references to filesystem links.

Implements

Constructors

Creates a Link object.
Link.fromUri(Uri uri)
Creates a Link object.

Instance Properties

absolute Link
read-only
isAbsolute bool Inherited
read-only
parent Directory Inherited
read-only
path String Inherited
read-only
uri Uri Inherited
read-only

Instance Methods

create(String target, {bool recursive: false}) → Future<Link>
Creates a symbolic link. Returns a Future<Link> that completes with the link when it has been created. If the link exists, the future will complete with an error.
createSync(String target, {bool recursive: false}) → void
Synchronously create the link. Calling createSync on an existing link will throw an exception.
updateSync(String target) → void
Synchronously updates the link. Calling updateSync on a non-existing link will throw an exception.
update(String target) → Future<Link>
Updates the link. Returns a Future<Link> that completes with the link when it has been updated. Calling update on a non-existing link will complete its returned future with an exception.
Resolves the path of a file system object relative to the current working directory, resolving all symbolic links on the path and resolving all .. and . path segments.
resolveSymbolicLinksSync() → String
Resolves the path of a file system object relative to the current working directory, resolving all symbolic links on the path and resolving all .. and . path segments.
rename(String newPath) → Future<Link>
Renames this link. Returns a Future<Link> that completes with a Link instance for the renamed link.
renameSync(String newPath) → Link
Synchronously renames this link. Returns a Link instance for the renamed link.
target() → Future<String>
Gets the target of the link. Returns a future that completes with the path to the target.
targetSync() → String
Synchronously gets the target of the link. Returns the path to the target.
watch({int events: FileSystemEvent.ALL, bool recursive: false}) → Stream<FileSystemEvent> Inherited
Start watching the FileSystemEntity for changes.
deleteSync({bool recursive: false}) → void Inherited
Synchronously deletes this FileSystemEntity.
stat() → Future<FileStat> Inherited
Calls the operating system's stat() function on the path of this FileSystemEntity. Identical to FileStat.stat(this.path).
existsSync() → bool Inherited
Synchronously checks whether the file system entity with this path exists.
delete({bool recursive: false}) → Future<FileSystemEntity> Inherited
Deletes this FileSystemEntity.
exists() → Future<bool> Inherited
Checks whether the file system entity with this path exists. Returns a Future<bool> that completes with the result.
statSync() → FileStat Inherited
Synchronously calls the operating system's stat() function on the path of this FileSystemEntity. Identical to FileStat.statSync(this.path).