Class FileSystemDirectoryHandle
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The FileSystemDirectoryHandle interface of the {{domxref("File System API", "File System API", "", "nocode")}} provides a handle to a file system directory.
[Value("FileSystemDirectoryHandle")]
public class FileSystemDirectoryHandle : FileSystemHandle
- Inheritance
-
FileSystemDirectoryHandle
- Inherited Members
Remarks
The interface can be accessed via the 'window.ShowDirectoryPicker', 'StorageManager.GetDirectory', 'DataTransferItem.GetAsFileSystemHandle', and 'FileSystemDirectoryHandle.GetDirectoryHandle' methods.
-File System API
-The File System Access API: simplifying access to local files
Constructors
FileSystemDirectoryHandle()
public FileSystemDirectoryHandle()
Properties
this[int]
public string this[int i] { get; set; }
Parameters
iint
Property Value
Methods
GetDirectoryHandle(string, FileSystemGetDirectoryOptions)
The getDirectoryHandle() method of the
FileSystemDirectoryHandle interface returns a
'FileSystemDirectoryHandle' for a subdirectory with the specified name
within the directory handle on which the method is called.
[Value("getDirectoryHandle")]
public Task<FileSystemDirectoryHandle> GetDirectoryHandle(string name, FileSystemGetDirectoryOptions options = null)
Parameters
namestringoptionsFileSystemGetDirectoryOptions
Returns
- Task<FileSystemDirectoryHandle>
A {{jsxref('Promise')}} which resolves with a 'FileSystemDirectoryHandle'.
Remarks
GetFileHandle(string, FileSystemGetFileOptions)
The getFileHandle() method of the
FileSystemDirectoryHandle interface returns a
'FileSystemFileHandle' for a file with the specified name, within the
directory the method is called.
[Value("getFileHandle")]
public Task<FileSystemFileHandle> GetFileHandle(string name, FileSystemGetFileOptions options = null)
Parameters
namestringoptionsFileSystemGetFileOptions
Returns
- Task<FileSystemFileHandle>
A {{jsxref('Promise')}} which resolves with a 'FileSystemFileHandle'.
Remarks
RemoveEntry(string, FileSystemRemoveOptions)
The removeEntry() method of the
FileSystemDirectoryHandle interface attempts to remove an entry if the
directory handle contains a file or directory called the name specified.
[Value("removeEntry")]
public Task<GlobalObject.Undefined> RemoveEntry(string name, FileSystemRemoveOptions options = null)
Parameters
namestringoptionsFileSystemRemoveOptions
Returns
- Task<GlobalObject.Undefined>
A 'Promise' which resolves with
undefined.
Remarks
Resolve(FileSystemHandle)
The resolve() method of the
FileSystemDirectoryHandle interface returns an {{jsxref('Array')}} of
directory names from the parent handle to the specified child entry, with the name of
the child entry as the last array item.
[Value("resolve")]
public Task<List<string>?> Resolve(FileSystemHandle possibleDescendant)
Parameters
possibleDescendantFileSystemHandle
Returns
- Task<List<string>>
A 'Promise' which resolves with an 'Array' of
strings, ornullifpossibleDescendantis not a descendant of this 'FileSystemDirectoryHandle'.