FileSystemError class

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);

Implemented types
Available extensions
Annotations
  • @JS.new()
  • @staticInterop

Constructors

FileSystemError([Object? messageOrUri])
factory

Properties

cause ↔ Object?

Available on Error, provided by the Error$Typings extension

getter/setter pair
code → String

Available on FileSystemError, provided by the FileSystemError$Typings extension

A code that identifies this error.
no setter
hashCode → int
The hash code for this object.
no setterinherited
message ↔ String

Available on Error, provided by the Error$Typings extension

getter/setter pair
name ↔ String

Available on Error, provided by the Error$Typings extension

getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stack ↔ String?

Available on Error, provided by the Error$Typings extension

getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fileExists([Object? messageOrUri]) → FileSystemError
Create an error to signal that a file or folder already exists, e.g. when creating but not overwriting a file.
fileIsADirectory([Object? messageOrUri]) → FileSystemError
Create an error to signal that a file is a folder.
fileNotADirectory([Object? messageOrUri]) → FileSystemError
Create an error to signal that a file is not a folder.
fileNotFound([Object? messageOrUri]) → FileSystemError
Create an error to signal that a file or folder wasn't found.
noPermissions([Object? messageOrUri]) → FileSystemError
Create an error to signal that an operation lacks required permissions.
unavailable([Object? messageOrUri]) → FileSystemError
Create an error to signal that the file system is unavailable or too busy to complete a request.