Directory

← Back

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

Author

Contributors

Rating

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);

Compatibility

(Loading compatibility data...)

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 23+ in 3.2.0
Vaadin 22 in 3.1.0
Vaadin 21 in 3.1.0
Vaadin 18+ in 3.0.0
Vaadin 10+ in 2.1.0
Vaadin 14 in 2.0.0
Vaadin 8.2+ in 1.1.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 Vaadin7 Filesystem DataProvider Add-on - Vaadin Add-on Directory
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.
Online