An event to signal that a resource has been created, changed, or deleted. This event should fire for resources that are being watched by clients of this provider.
Note: It is important that the metadata of the file that changed provides an
updated mtime
that advanced from the previous value in the stat and a
correct size
value. Otherwise there may be optimizations in place that will not show
the change in an editor for example.
Subscribes to file change events in the file or folder denoted by uri
. For folders,
the option recursive
indicates whether subfolders, sub-subfolders, etc. should
be watched for file changes as well. With recursive: false
, only changes to the
files that are direct children of the folder should trigger an event.
The excludes
array is used to indicate paths that should be excluded from file
watching. It is typically derived from the files.watcherExclude
setting that
is configurable by the user. Each entry can be be:
build/output
)**/build
, output/**
)It is the file system provider's job to call onDidChangeFile
for every change given these rules. No event should be emitted for files that match any of the provided
excludes.
The uri of the file or folder to be watched.
Configures the watch.
When enabled also watch subfolders.
A list of paths and pattern to exclude from watching.
A disposable that tells the provider to stop watching the uri
.
Retrieve metadata about a file.
Note that the metadata for symbolic links should be the metadata of the file they refer to.
Still, the SymbolicLink-type must be used in addition to the actual type, e.g.
FileType.SymbolicLink | FileType.Directory
.
The uri of the file to retrieve metadata about.
The file metadata about the file.
Write data to a file, replacing its entire contents.
The uri of the file.
The new content of the file.
Defines if missing files should or must be created.
Create the file if it does not exist already.
Overwrite the file if it does exist.
Copy files or folders. Implementing this function is optional but it will speedup the copy operation.
The existing file.
The destination location.
Defines if existing files should be overwritten.
Overwrite the file if it does exist.
The filesystem provider defines what the editor needs to read, write, discover, and to manage files and folders. It allows extensions to serve files from remote places, like ftp-servers, and to seamlessly integrate those into the editor.
foo:/my/path
is a child offoo:/my/
and a parent offoo:/my/path/deeper
.onFileSystem:<scheme>
that fires when a file or folder is being accessed.