FileSystem class

A generic representation of a file system.

Note that this class uses dart:io only inasmuch as it deals in the types exposed by the dart:io library. Subclasses should document their level of dependence on the library (and the associated implications of using that implementation in the browser).

Implementers

Constructors

FileSystem()
Creates a new FileSystem.
const

Properties

currentDirectory Directory
Creates a directory object pointing to the current working directory.
read / write
isWatchSupported bool
Tests if FileSystemEntity.watch is supported on the current system.
read-only
path Context
An object for manipulating paths in this file system.
read-only
systemTempDirectory Directory
Gets the system temp directory. [...]
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

directory(dynamic path) Directory
Returns a reference to a Directory at path. [...]
file(dynamic path) File
Returns a reference to a File at path. [...]
getPath(dynamic path) String
Gets the string path represented by the specified generic path. [...]
@protected
identical(String path1, String path2) Future<bool>
Checks whether two paths refer to the same object in the file system. Returns a Future<bool> that completes with the result. [...]
identicalSync(String path1, String path2) bool
Synchronously checks whether two paths refer to the same object in the file system. [...]
isDirectory(String path) Future<bool>
Checks if type(path) returns io.FileSystemEntityType.DIRECTORY.
isDirectorySync(String path) bool
Synchronously checks if type(path) returns io.FileSystemEntityType.DIRECTORY.
isFile(String path) Future<bool>
Checks if type(path) returns io.FileSystemEntityType.FILE.
isFileSync(String path) bool
Synchronously checks if type(path) returns io.FileSystemEntityType.FILE.
Checks if type(path) returns io.FileSystemEntityType.LINK.
isLinkSync(String path) bool
Synchronously checks if type(path) returns io.FileSystemEntityType.LINK.
Returns a reference to a Link at path. [...]
stat(String path) Future<FileStat>
Asynchronously calls the operating system's stat() function on path. Returns a Future which completes with a FileStat object containing the data returned by stat(). If the call fails, completes the future with a FileStat object with .type set to FileSystemEntityType.NOT_FOUND and the other fields invalid.
statSync(String path) FileStat
Calls the operating system's stat() function on path. Returns a FileStat object containing the data returned by stat(). If the call fails, returns a FileStat object with .type set to FileSystemEntityType.NOT_FOUND and the other fields invalid.
type(String path, { bool followLinks: true }) Future<FileSystemEntityType>
Finds the type of file system object that a path points to. Returns a Future that completes with the result. [...]
typeSync(String path, { bool followLinks: true }) FileSystemEntityType
Syncronously finds the type of file system object that a path points to. Returns a FileSystemEntityType. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

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