Class JSFilePicker


  • public class JSFilePicker
    extends java.lang.Object
    A file selector based on the JavaScript File System Access API
    Author:
    gianpiero.diblasi
    • Method Detail

      • showDirectoryPicker

        public static void showDirectoryPicker​(DirectoryPickerOptions options,
                                               simulation.js.$Apply_1_Void<FileSystemDirectoryHandle> response)
        Shows a directory picker
        Parameters:
        options - The options
        response - The function to call on close
      • showOpenFilePicker

        public static void showOpenFilePicker​(FilePickerOptions options,
                                              int maximumFileSize,
                                              simulation.js.$Apply_1_Void<def.js.Array<FileSystemFileHandle>> response)
        Shows an open file picker
        Parameters:
        options - The options
        maximumFileSize - The maximum allowed file size in Mbytes, a value less than or equal to 0 to set no constraint on the size
        response - The function to call on close
      • showSaveFilePicker

        public static void showSaveFilePicker​(FilePickerOptions options,
                                              simulation.js.$Apply_1_Void<FileSystemFileHandle> response)
        Shows a save file picker
        Parameters:
        options - The options
        response - The function to call on close