Add-on Directory

Filesystem API for Vaadin - Add-on - Vaadin Add-on Directory

Vaadin add-on providing Java API for the browser File System API Filesystem API for Vaadin - Add-on - Vaadin Add-on Directory
## Filesystem API for Vaadin A server-side Java API for the browser's [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API). Bind a `ClientFileSystem` to any Vaadin component and interact with the user's local file system — no custom JavaScript required. ### Features - **File pickers** — open, save, and directory picker dialogs triggered from server-side Java - **Read & write files** — transfer content between browser and server as `byte[]`, `String`, or streams - **Directory traversal** — list entries, create/remove files and subdirectories, resolve paths - **Origin Private File System (OPFS)** — sandboxed per-origin storage without user prompts, via `OriginPrivateFileSystem` - **Streaming transfers** — efficient large-file upload and download using Vaadin's `UploadHandler` / `DownloadHandler` - **Save to device** — trigger browser downloads from OPFS files - **Two API styles** — `CompletableFuture`-based (`ClientFileSystem`) and callback-based (`CallbackClientFileSystem`) - **Handle lifecycle** — automatic cleanup of JS-side handles on component detach ### Browser Compatibility | Feature | Chrome / Edge / Opera | Firefox | Safari | |---|---|---|---| | File & directory pickers | ✅ Full support | ❌ Not supported | ❌ Not supported | | OPFS | ✅ Full support | ✅ Supported | ✅ Supported | | Permissions API | ✅ Full support | ❌ Not supported | ❌ Not supported | File picker dialogs (`showOpenFilePicker`, `showSaveFilePicker`, `showDirectoryPicker`) require a **Chromium-based browser**. Firefox and Safari support only the Origin Private File System (OPFS), which does not require user interaction or picker dialogs. See [MDN browser compatibility](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API#browser_compatibility) for full details. ### Requirements - Java 21+ - Vaadin 25+
View on GitHub
Online Demo

Filesystem API for Vaadin - Add-on version 1.0.1