Header menu logo fable-electron-docs-api

webUtils Type

⚠ Process Availability: Main ❌ | Renderer ✔ | Utility ❌ | Exported ✔

A utility layer to interact with Web API objects (Files, Blobs, etc.)Process: Renderer> [!IMPORTANT] If you want to call this API from a renderer process with context isolation enabled, place the API call in your preload script and expose it using the contextBridge API.

Static members

Static member Description

webUtils.getPathForFile file

Full Usage: webUtils.getPathForFile file

Parameters:
Returns: string
Modifiers: inline

The file system path that this File object points to. In the case where the object passed in is not a File object an exception is thrown. In the case where the File object passed in was constructed in JS and is not backed by a file on disk an empty string is returned.This method superseded the previous augmentation to the File object with the path property. An example is included below.

file : File
Returns: string

Type something to start searching.