Readonly
onAn 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.
Optional
closeOptional
copyCopy files or folders. Implementing this function is optional but it will speedup the copy operation.
FileNotFound
when source
doesn't exist.
FileNotFound
when parent of destination
doesn't exist, e.g. no mkdirp-logic required.
FileExists
when destination
exists and when the overwrite
option is not true
.
NoPermissions
when permissions aren't sufficient.
Create a new directory (Note, that new files are created via write
-calls).
The uri of the new folder.
FileNotFound
when the parent of uri
doesn't exist, e.g. no mkdirp-logic required.
FileExists
when uri
already exists.
NoPermissions
when permissions aren't sufficient.
Optional
openOptional
readRetrieve all entries of a directory.
The uri of the folder.
An array of name/type-tuples or a thenable that resolves to such.
FileNotFound
when uri
doesn't exist.
Read the entire contents of a file.
The uri of the file.
An array of bytes or a thenable that resolves to such.
FileNotFound
when uri
doesn't exist.
Rename a file or folder.
FileNotFound
when oldUri
doesn't exist.
FileNotFound
when parent of newUri
doesn't exist, e.g. no mkdirp-logic required.
FileExists
when newUri
exists and when the overwrite
option is not true
.
NoPermissions
when permissions aren't sufficient.
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.
FileNotFound
when uri
doesn't exist.
Subscribe to events in the file or folder denoted by uri
.
The editor will call this function for files and folders. In the latter case, the
options differ from defaults, e.g. what files/folders to exclude from watching
and if subfolders, sub-subfolder, etc. should be watched (recursive
).
The uri of the file to be watched.
Configures the watch.
A disposable that tells the provider to stop watching the uri
.
Optional
writeWrite 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.
FileNotFound
when uri
doesn't exist and create
is not set.
FileNotFound
when the parent of uri
doesn't exist and create
is set, e.g. no mkdirp-logic required.
FileExists
when uri
already exists, create
is set but overwrite
is not set.
NoPermissions
when permissions aren't sufficient.
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.