Filesystem DataProvider Add-on
This is FilesystemDataProvider and FtpDataProvider for Vaadin 24, 23, 14 and 8 and does roughly the same functions as FilesystemContainer for Vaadin7
This is FilesystemDataProvider and FtpDataProvider for 24, 23, 14 and 8. Add-on includes also FileSelect and FtpSelect single select components to browse filesystem and select a file. With this data provider it is easy to load local filesystem hierarchy or ftp (from server) to customized TreeGrid. The add-on includes also rudimentary icon mapper for MIME types using VaadinIcons.
The FilesystemDataProvider and FtpDataProvider can be used both in recursive (read file system data at once) and non-recursive mode (read file system data as per needed), see demo application for details.
The add-on has also FileSelect and FtpSelect field components included for simple single select file browsing.
Sample code
// Demo 1: Use FilesystemData non-recursively // When using non-recursive mode, it is possible to browse entire file system // DataProvider pre-fetches root directory and rest is loaded progressively // lazily File rootFile = new File("C:/"); FilesystemData root = new FilesystemData(rootFile, false); FilesystemDataProvider fileSystem = new FilesystemDataProvider(root); final Tree<File> tree = new Tree<>(); tree.setDataProvider(fileSystem); tree.setItemIconGenerator(file -> { return FileTypeResolver.getIcon(file); }); final Panel layout1 = new Panel(); layout1.setSizeFull(); layout1.setContent(tree);
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Version 4.0.0
- Compatible with Vaadin 24.1
- Released
- 2023-07-18
- Maturity
- BETA
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 24
- Vaadin 8.2+ in 0.1.0
- Vaadin 14 in 2.0.0
- Vaadin 10+ in 2.1.0
- Vaadin 18+ in 3.0.0
- Vaadin 22 in 3.1.0
- Vaadin 21 in 3.1.0
- Vaadin 23+ in 3.2.0
- Browser
- Firefox
- Opera
- Safari
- Google Chrome
- iOS Browser
- Android Browser
- Microsoft Edge
Filesystem DataProvider Add-on - Vaadin Add-on Directory
This is FilesystemDataProvider and FtpDataProvider for Vaadin 24, 23, 14 and 8 and does roughly the same functions as FilesystemContainer for Vaadin7Blog post
Source code (Vaadin 8)
Source Code (Vaadin 14)
Filesystem DataProvider Add-on version 0.1.0
### 0.1.0
First release, feedback welcome
Filesystem DataProvider Add-on version 0.2.0
### Version 0.2.0
- Added JavaDocs
- Minor fixes and improvements
- Updated README.md
Filesystem DataProvider Add-on version 0.3.0
### Version 0.3.0
- Made lazy loading automatic in non-recursive mode
Filesystem DataProvider Add-on version 1.0.0
### Version 1.0.0
- Added FileSelect: A simple single select component for files
- Complemented JavaDocs
Filesystem DataProvider Add-on version 1.0.1
Version 1.0.1
- Fixed FileSelect to work with keyboard selection as well
Filesystem DataProvider Add-on version 1.1.0
### Version 1.1.0
- Added filename extension filter support to FileSelect
Filesystem DataProvider Add-on version 2.0.0
### Version 2.0.0
- Migrated the add-on to Vaadin 14
Filesystem DataProvider Add-on version 2.1.0
### Version 2.1.0
- Added FtpSelect, FtpData and FtpDataProvider using Apache Commons FTPClient
Filesystem DataProvider Add-on version 3.0.0
### Version 3.0.0
- Build for Vaadin 18+ and newer. There is backwards compatibility breaking change in the framework due new DataView API and Filesystem DataProvider was impacted by this.
Filesystem DataProvider Add-on version 3.1.0
### Version 3.1.0
- Fix icons with Vaadin 21.0
- Added MultiFileSelect component
Filesystem DataProvider Add-on version 3.2.0
### Version 3.2.0
- Built against Vaadin 23
Filesystem DataProvider Add-on version 4.0.0
### Version 4.0.0
- Compatible with Vaadin 24.1