Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion files/en-us/web/api/file_system_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ The following example returns a directory handle with the specified name. If the
const dirName = "directoryToGetName";

// assuming we have a directory handle: 'currentDirHandle'
const subDir = currentDirHandle.getDirectoryHandle(dirName, { create: true });
const subDir = await currentDirHandle.getDirectoryHandle(dirName, {
create: true,
});
```

The following asynchronous function uses `resolve()` to find the path to a chosen file, relative to a specified directory handle.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ directory does not exist it is created.
const dirName = "directoryToGetName";

// assuming we have a directory handle: 'currentDirHandle'
const subDir = currentDirHandle.getDirectoryHandle(dirName, { create: true });
const subDir = await currentDirHandle.getDirectoryHandle(dirName, {
create: true,
});
```

## Specifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ not exist it is created.
const fileName = "fileToGetName";

// assuming we have a directory handle: 'currentDirHandle'
const fileHandle = currentDirHandle.getFileHandle(fileName, { create: true });
const fileHandle = await currentDirHandle.getFileHandle(fileName, {
create: true,
});
```

## Specifications
Expand Down
4 changes: 3 additions & 1 deletion files/en-us/web/api/filesystemdirectoryhandle/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ The following example returns a directory handle with the specified name; if the
const dirName = "directoryToGetName";

// assuming we have a directory handle: 'currentDirHandle'
const subDir = currentDirHandle.getDirectoryHandle(dirName, { create: true });
const subDir = await currentDirHandle.getDirectoryHandle(dirName, {
create: true,
});
```

### Return file path
Expand Down
Loading