Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FileSystemError

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

Hierarchy

  • Error
    • FileSystemError

Index

Properties(4)

name

name: string

message

message: string

Optional stack

stack: string

Readonly code

code: string

A code that identifies this error.

Possible values are names of errors, like FileNotFound, or Unknown for unspecified errors.

Methods(6)

Static FileNotFound

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

    Parameters

    • Optional messageOrUri: string | Uri

      Message or uri.

    Returns FileSystemError

Static FileExists

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

    Parameters

    • Optional messageOrUri: string | Uri

      Message or uri.

    Returns FileSystemError

Static FileNotADirectory

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

    Parameters

    • Optional messageOrUri: string | Uri

      Message or uri.

    Returns FileSystemError

Static FileIsADirectory

Static NoPermissions

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

    Parameters

    • Optional messageOrUri: string | Uri

      Message or uri.

    Returns FileSystemError

Static Unavailable

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

    Parameters

    • Optional messageOrUri: string | Uri

      Message or uri.

    Returns FileSystemError

Constructors(1)

constructor

  • Creates a new filesystem error.

    Parameters

    • Optional messageOrUri: string | Uri

      Message or uri.

    Returns FileSystemError

Generated by TypeDoc. Maintained by 紫升

Links: 搜外友链, 69中文网