You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportinterfaceFileOptions{/** * Create a file when it doesn't exists */create?: boolean;/** * In combination with [`create`](FileOptions.create) but * the operation should fail when a file already exists. */exclusive?: boolean;/** * Open a file for reading. */read?: boolean;/** * Open a file for writing. */write?: boolean;}
And it is being used in:
readFile
writeFile
rename
copy
create vs exclusive
not clear what the relation between create and exclusive is, can it be both or either one? maybe this should be reflected in some enum so it is clear it can only be one value?
read vs write
what is the use case for this option? should I handle the case in writeFile if options.write is not configured? today in my implementation I totally ignore this.
The text was updated successfully, but these errors were encountered:
bpasero
changed the title
FileSystemProvider: FileOptions is a bit weird to support
FileSystemProvider: FileOptions is a bit weird to support/understand
Apr 25, 2018
what is the use case for this option? should I handle the case in writeFile if options.write is not configured? today in my implementation I totally ignore this.
It leaks a little the plan of having fopen/fclose but technically you can combine things, e.g. create a file when trying to read it, like the w+-flag
Similar exclusive is the x flag which causes failure when combined with + and when the file already exists.
Refs: #48421
Today
vscode.FileOptions
is this:And it is being used in:
readFile
writeFile
rename
copy
create vs exclusive
not clear what the relation between create and exclusive is, can it be both or either one? maybe this should be reflected in some enum so it is clear it can only be one value?
read vs write
what is the use case for this option? should I handle the case in
writeFile
ifoptions.write
is not configured? today in my implementation I totally ignore this.The text was updated successfully, but these errors were encountered: