Namespace: SpawnDev.SpawnJS.JSObjects
Source: JSObjects/FileSystemGetEntryOptions.cs
MDN Reference: FileSystemGetEntryOptions on MDN
Options used for FileSystemDirectoryEntry.GetDirectory method. https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryEntry/getDirectory#options_parameter
| Property | Type | Access | Description |
|---|---|---|---|
FileSystemGetEntryOptions |
class |
get | Options used for FileSystemDirectoryEntry.GetDirectory method. https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryEntry/getDirectory#options_parameter |
Exclusive |
bool? |
get |
SpawnDev.SpawnJS Mapping Note: The JavaScript examples below show the standard Web API usage. In SpawnDev.SpawnJS, the same API is available with C# conventions:
- Properties and methods use PascalCase (e.g.,
readyStatebecomesReadyState)- Events use ActionEvent with
+=/-=(e.g.,addEventListener("click", fn)becomesOnClick += handler)- Async methods return
Task<T>instead ofPromise<T>- Objects should be disposed with
usingstatements- Access via
JS.Get<FileSystemGetEntryOptions>(...)or constructornew FileSystemGetEntryOptions(...)
let dictionary = null;
function loadDictionaryForLanguage(appDataDirEntry, lang) {
dictionary = null;
appDataDirEntry.getDirectory("Dictionaries", {}, (dirEntry) => {
dirEntry.getFile(`${lang}-dict.json`, {}, (fileEntry) => {
fileEntry.file((dictFile) => {
let reader = new FileReader();
reader.addEventListener("loadend", () => {
dictionary = JSON.parse(reader.result);
});
reader.readAsText(dictFile);
});
});
});
}