Search e01
One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.
6 results across 6 corpora for FileSystemFileHandle: createWritable() method.
Developer library 6
FileSystemWritableFileStream
File System API is a WritableStream object with additional convenience methods, which operates on a single file on disk. The interface is accessed through the FileSystemFileHandle.createWritable() method. ## Instance properties _Inherits properties from its parent, WritableStream._ ## Instance methods _Inherits methods from its parent, WritableStream._ - FileSystemWritableFileStream.write() - : Writes conte
FileSystemWritableFileStream: seek() method
rror - : Thrown if `position` is not a number or not defined. ## Examples The following asynchronous function opens the 'Save File' picker, which returns a FileSystemFileHandle once a file is selected. From this, a writable stream is created using the FileSystemFileHandle.createWritable() method. Next, we write to the stream: 1. A text string is written to the stream. 2. The `seek()` method is used to put the c
FileSystemWritableFileStream: write() method
f `data` is undefined, or if `position` or `size` aren't valid. ## Examples The following asynchronous function opens the 'Save File' picker, which returns a FileSystemFileHandle once a file is selected. From this, a writable stream is created using the FileSystemFileHandle.createWritable() method. A text string is then written to the stream, which is subsequently closed. ```js async function saveFile() { try {
FileSystemWritableFileStream: truncate() method
ypeError - : Thrown if `size` is not a number or not defined. ## Examples The following asynchronous function opens the 'Save File' picker, which returns a FileSystemFileHandle once a file is selected. From this, a writable stream is created using the FileSystemFileHandle.createWritable() method. Next, we write to the stream: 1. A text string is written to the stream. 2. The `truncate()` method is used to resiz
File System API
structure. Most of the interaction with files and directories is accomplished through handles. A parent FileSystemHandle class helps define two child classes: FileSystemFileHandle and FileSystemDirectoryHandle, for files and directories respectively. The handles represent a file or directory on the user's system. You can first gain access to them by showing the user a file or directory picker using methods such as
Origin private file system
PI), provides access to files using picker methods. For example: 1. Window.showOpenFilePicker() allows the user to choose a file to access, which results in a FileSystemFileHandle object being returned. 2. FileSystemFileHandle.getFile() is called to get access to the file's contents, the content is modified using FileSystemFileHandle.createWritable() / FileSystemWritableFileStream.write(). 3. FileSystemHandle.reques