Options
All
  • Public
  • Public/Protected
  • All
Menu

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

层级

  • Error
    • FileSystemError

索引

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

友链:VS Code 中文文档 | VS Code 官网文档 | VS Code 扩展市场

Generated by TypeDoc. Maintained by 洛竹