A type that filesystem providers should use to signal errors.

This class has factory methods for common error-cases, like FileNotFound when a file or folder doesn't exist, use them like so: throw vscode.FileSystemError.FileNotFound(someUri);

Static methods

staticFileExists(?messageOrUri:EitherType<String, Uri>):FileSystemError

Create an error to signal that a file or folder already exists, e.g. when creating but not overwriting a file.

Parameters:

messageOrUri

Message or uri.

staticFileIsADirectory(?messageOrUri:EitherType<String, Uri>):FileSystemError

Create an error to signal that a file is a folder.

Parameters:

messageOrUri

Message or uri.

staticFileNotADirectory(?messageOrUri:EitherType<String, Uri>):FileSystemError

Create an error to signal that a file is not a folder.

Parameters:

messageOrUri

Message or uri.

staticFileNotFound(?messageOrUri:EitherType<String, Uri>):FileSystemError

Create an error to signal that a file or folder wasn't found.

Parameters:

messageOrUri

Message or uri.

staticNoPermissions(?messageOrUri:EitherType<String, Uri>):FileSystemError

Create an error to signal that an operation lacks required permissions.

Parameters:

messageOrUri

Message or uri.

staticUnavailable(?messageOrUri:EitherType<String, Uri>):FileSystemError

Create an error to signal that the file system is unavailable or too busy to complete a request.

Parameters:

messageOrUri

Message or uri.

Constructor

new(?messageOrUri:EitherType<String, Uri>)

Creates a new filesystem error.

Parameters:

messageOrUri

Message or uri.

Variables

read onlycode:String

A code that identifies this error.

Possible values are names of errors, like {@linkcode FileSystemError.FileNotFound FileNotFound}, or Unknown for unspecified errors.