FileSystemProvider
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.
Note 1: The filesystem provider API works with uris and assumes hierarchical paths, e.g.
foo:/my/path
is a child offoo:/my/
and a parent offoo:/my/path/deeper
.Note 2: There is an activation event
onFileSystem:<scheme>
that fires when a file or folder is being accessed.Note 3: The word 'file' is often used to denote all kinds of files, e.g. folders, symbolic links, and regular files.
Types
Properties
Copy files or folders. Implementing this function is optional but it will speedup the copy operation.
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.
Functions
Create a new directory (Note, that new files are created via write
-calls).
Delete a file.
Retrieve all entries of a directory.
Read the entire contents of a file.
Rename a file or folder.
Retrieve metadata about a file.
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.
Write data to a file, replacing its entire contents.