@@ -132,7 +132,7 @@ declare module 'vscode' {
132132 */
133133 export interface FileSystemProvider2 {
134134
135- _version : 7 ;
135+ _version : 8 ;
136136
137137 /**
138138 * An event to signal that a resource has been created, changed, or deleted. This
@@ -149,13 +149,14 @@ declare module 'vscode' {
149149 watch ( uri : Uri , options : { recursive ?: boolean ; excludes ?: string [ ] } ) : Disposable ;
150150
151151 /**
152- * Retrieve metadata about a file.
152+ * Retrieve metadata about a file. Throw an [`EntryNotFound`](#FileError.EntryNotFound)-error
153+ * in case the file does not exist.
153154 *
154155 * @param uri The uri of the file to retrieve meta data about.
155156 * @param token A cancellation token.
156157 * @return The file metadata about the file.
157158 */
158- stat ( uri : Uri , token : CancellationToken ) : FileStat2 | Thenable < FileStat2 > ;
159+ stat ( uri : Uri , options : { /*future: followSymlinks*/ } , token : CancellationToken ) : FileStat2 | Thenable < FileStat2 > ;
159160
160161 /**
161162 * Retrieve the meta data of all entries of a [directory](#FileType2.Directory)
@@ -164,15 +165,15 @@ declare module 'vscode' {
164165 * @param token A cancellation token.
165166 * @return A thenable that resolves to an array of tuples of file names and files stats.
166167 */
167- readDirectory ( uri : Uri , token : CancellationToken ) : [ string , FileStat2 ] [ ] | Thenable < [ string , FileStat2 ] [ ] > ;
168+ readDirectory ( uri : Uri , options : { /*future: onlyType?*/ } , token : CancellationToken ) : [ string , FileStat2 ] [ ] | Thenable < [ string , FileStat2 ] [ ] > ;
168169
169170 /**
170171 * Create a new directory. *Note* that new files are created via `write`-calls.
171172 *
172173 * @param uri The uri of the *new* folder.
173174 * @param token A cancellation token.
174175 */
175- createDirectory ( uri : Uri , token : CancellationToken ) : FileStat2 | Thenable < FileStat2 > ;
176+ createDirectory ( uri : Uri , options : { /*future: permissions?*/ } , token : CancellationToken ) : FileStat2 | Thenable < FileStat2 > ;
176177
177178 /**
178179 * Read the entire contents of a file.
@@ -192,6 +193,15 @@ declare module 'vscode' {
192193 */
193194 writeFile ( uri : Uri , content : Uint8Array , options : { flags : FileOpenFlags } , token : CancellationToken ) : void | Thenable < void > ;
194195
196+ /**
197+ * Delete a file or folder from the underlying storage.
198+ *
199+ * @param uri The resource that is to be deleted
200+ * @param options Options bag for future use
201+ * @param token A cancellation token.
202+ */
203+ delete ( uri : Uri , options : { /*future: useTrash?, followSymlinks?*/ } , token : CancellationToken ) : void | Thenable < void > ;
204+
195205 /**
196206 * Rename a file or folder.
197207 *
@@ -210,10 +220,6 @@ declare module 'vscode' {
210220 * @param token A cancellation token.
211221 */
212222 copy ?( uri : Uri , target : Uri , options : { flags : FileOpenFlags } , token : CancellationToken ) : FileStat2 | Thenable < FileStat2 > ;
213-
214- // todo@remote
215- // ? useTrash, expose trash
216- delete ( uri : Uri , token : CancellationToken ) : void | Thenable < void > ;
217223 }
218224
219225 export namespace workspace {
0 commit comments