W3cubDocs

/Dart 2

Link class

Link objects are references to filesystem links.

Implemented types

Constructors

Creates a Link object.
Link.fromRawPath(Uint8List rawPath)
factory
Link.fromUri(Uri uri)
factory
Creates a Link object. [...]

Properties

absoluteLink
read-only, override
Returns a Link instance whose path is the absolute path to this. [...]
hashCodeint
read-only, inherited
The hash code for this object. [...]
isAbsolutebool
read-only, inherited
Returns a bool indicating whether this object's path is absolute. [...]
parentDirectory
read-only, inherited
The directory containing this.
pathString
read-only, inherited
runtimeTypeType
read-only, inherited
A representation of the runtime type of the object.
uriUri
read-only, inherited
Returns a Uri representing the file system entity's location. [...]

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. [...]
rename(String newPath) → Future<Link>
override
Renames this link. Returns a Future<Link> that completes with a Link instance for the renamed link. [...]
renameSync(String newPath) → Link
override
Synchronously renames this link. Returns a Link instance for the renamed link. [...]
Resolves the path of a file system object relative to the current working directory. [...]
resolveSymbolicLinksSync() → String
override
Resolves the path of a file system object relative to the current working directory. [...]
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. [...]
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.
updateSync(String target) → void
Synchronously updates the link. Calling updateSync on a non-existing link will throw an exception.
delete({bool recursive: false }) → Future<FileSystemEntity>
inherited
Deletes this FileSystemEntity. [...]
deleteSync({bool recursive: false }) → void
inherited
Synchronously 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. [...]
existsSync() → bool
inherited
Synchronously checks whether the file system entity with this path exists. [...]
noSuchMethod(Invocation invocation) → dynamic
inherited
Invoked when a non-existent method or property is accessed. [...]
stat() → Future<FileStat>
inherited
Calls the operating system's stat() function on the path of this FileSystemEntity. [...]
statSync() → FileStat
inherited
Synchronously calls the operating system's stat() function on the path of this FileSystemEntity. [...]
toString() → String
inherited
Returns a string representation of this object.
watch({int events: FileSystemEvent.all, bool recursive: false }) → Stream<FileSystemEvent>
inherited
Start watching the FileSystemEntity for changes. [...]

Operators

operator ==(dynamic other) → bool
inherited
The equality operator. [...]

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-io/Link-class.html