UNPKG

@fgv/ts-web-extras

Version:

Browser-compatible utilities and FileTree implementations

73 lines (34 loc) 1.04 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@fgv/ts-web-extras](./ts-web-extras.md) &gt; [FileTreeHelpers](./ts-web-extras.filetreehelpers.md) &gt; [getOriginalFile](./ts-web-extras.filetreehelpers.getoriginalfile.md) ## FileTreeHelpers.getOriginalFile() function Helper function to get the original File object from a FileList by path. **Signature:** ```typescript export declare function getOriginalFile(fileList: FileList, path: string): Result<File>; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> fileList </td><td> FileList </td><td> The original FileList </td></tr> <tr><td> path </td><td> string </td><td> The path to the file </td></tr> </tbody></table> **Returns:** Result&lt;File&gt; A successful Result with the File object if found, or a failed Result with an error message otherwise