Interact with files on the user's local device under a secure context (localhost or https).

After a user grants a web app access, this plugin allows to read or save changes directly to files and folders on the user's device.


Sample App:
https://visualneo.com/tutorials/filesystem


Description


The neoFileSystem plugin for VisualNEO Web provides robust file and folder interaction capabilities within a web app environment, particularly when running over a secure connection or localhost. Here’s an outline of its key functionalities:

    • Folder Selection and Creation:
      • neoFolderBox: Opens a folder selection dialog, allowing users to choose a folder and returns a folder handle for further actions.
      • neoCreateFolder: Creates a new folder within a selected folder, providing read and write access. The new folder's handle is returned for ongoing use.
    • File Management:
      • neoFileOpenBox and neoFileSaveBox: Open standard file dialogs for selecting or saving files, providing handles for file manipulation.
      • neoCreateFile: Generates a new file within a user-selected folder and returns a file handle.
      • neoFileWrite and neoFileRead: Enable writing data to and reading data from files using file handles, supporting text and Base64 formats.
      • neoFileErase: Deletes specified files within an accessible folder.
    • Folder and File List Generation:
      • neoFileList: Creates a list of files or folders within a specified folder handle, supporting filtering options by file type.
    • Advanced File and Folder Operations:
      • neoRemoveFolderRecursive: Deletes a folder and all its contents recursively.
      • neoFileWriteFromURL: Downloads data from a URL and writes it directly to a file using its handle.
      • neoSetDropFileContainer: Configures a container in the app to accept files dragged and dropped into it, enhancing file interaction capabilities.
    • Metadata Retrieval:
      • neoFileName and neoFileSize: Retrieve a file’s name and size from a file handle, enabling detailed file information management.

The neoFileSystem plugin is ideal for applications that require direct interaction with local files and folders, offering features useful in file management, document processing, and data storage solutions​​​.

 

neoFileSystemDetect

Purpose:

Detect if the File System API is available.


Returns true or false.

Category:

neoFileSystem

Syntax:

neoFileSystemDetect [resultVar]

 

resultVar

Variable to store result

 

neoFolderBox

Purpose:

Display a Folder Selector and allow the user to make a selection. Allows read capabilities to folder content.


Returns a FolderHandle to the Callback subroutine.

Category:

neoFileSystem

Syntax:

neoFolderBox callBackFunction

 

callBackFunction

Callback subroutine

 

neoCreateFolder

Purpose:

Create a new folder within a user choosen folder with read and write capabilities.


Returns a FolderHandle to the Callback subroutine.

Category:

neoFileSystem

Syntax:

neoCreateFolder [folderHandle] "folderName" callBackFunction

 

folderHandle

FolderHandle

folderName

New folder name

callBackFunction

Callback subroutine

 

neoRemoveFolder

Purpose:

Delete a file on a folder you have obtained access.

Category:

neoFileSystem

Syntax:

neoRemoveFolder [folderHandle] "folderName" callBackFunction

 

folderHandle

FolderHandle

folderName

Folder name (ie: myfolder)

callBackFunction

Callback subroutine

 

neoRemoveFolderRecursive

Purpose:

Delete a file on a folder you have obtained access.

Category:

neoFileSystem

Syntax:

neoRemoveFolderRecursive [folderHandle] "folderName" callBackFunction

 

folderHandle

FolderHandle

folderName

Folder name (ie: myfolder)

callBackFunction

Callback subroutine

 

neoFileOpenBox

Purpose:

Allow the user to select a file name using a standard Windows File Open dialog box.


Returns a FileHandle to the Callback subroutine.

Category:

neoFileSystem

Syntax:

neoFileOpenBox initialPath fileType "fileMask" "theDescription" callBackFunction

 

initialPath

Initial path

fileType

Content type

fileMask

File mask (ie: .csv) (optional)

theDescription

Description (optional)

callBackFunction

Callback subroutine

 

neoFileSaveBox

Purpose:

Allow the user to specify a file name using a standard Windows File Save dialog box.


Returns a FileHandle to the Callback subroutine.

Category:

neoFileSystem

Syntax:

neoFileSaveBox initialPath fileType "fileMask" "theDescription" "theName" callBackFunction

 

initialPath

Initial path

fileType

Content type

fileMask

File mask (ie: .csv) (optional)

theDescription

Description (optional)

theName

Seggested file name (ie: myfile.txt) (optional)

callBackFunction

Callback subroutine

 

neoFileErase

Purpose:

Delete a file on a folder you have obtained access.

Category:

neoFileSystem

Syntax:

neoFileErase [folderHandle] "fileName" callBackFunction

 

folderHandle

FolderHandle

fileName

File name (ie: myfile.txt)

callBackFunction

Callback subroutine

 

neoCreateFile

Purpose:

Create a new file within a previously user choosen folder with read and write capabilities.


Returns a FileHandle to the Callback subroutine.

Category:

neoFileSystem

Syntax:

neoCreateFile [folderHandle] "fileName" callBackFunction

 

folderHandle

FolderHandle

fileName

File name

callBackFunction

Callback subroutine

 

neoFileName

Purpose:

Get the name of an external file using it's FileHandle.


Returns the value to the Callback subroutine.

Category:

neoFileSystem

Syntax:

neoFileName [fileHandle] callBackFunction

 

fileHandle

FileHandle

callBackFunction

Callback subroutine

 

neoFileSize

Purpose:

Get the size (in bytes) of an external file using it's FileHandle


Returns the value to the Callback subroutine.

Category:

neoFileSystem

Syntax:

neoFileSize [fileHandle] callBackFunction

 

fileHandle

FileHandle

callBackFunction

Callback subroutine

 

neoFileList

Purpose:

Generate an Array of files and/or folders found in the specified FolderHandle.


Returns the result to the Callback subroutine.

Category:

neoFileSystem

Syntax:

neoFileList [folderHandle] "fileMask" theOptions callBackFunction

 

folderHandle

FolderHandle

fileMask

File mask

theOptions

Options

callBackFunction

Callback subroutine

 

neoFileRead

Purpose:

Read data from an external text file using it's FileHandle


Returns the content to the Callback subroutine.

Category:

neoFileSystem

Syntax:

neoFileRead [fileHandle] callBackFunction

 

fileHandle

FileHandle

callBackFunction

Callback subroutine

 

neoFileWrite

Purpose:

Write data to an external text file using it's FileHandle

Category:

neoFileSystem

Syntax:

neoFileWrite [fileHandle] "theData" callBackFunction

 

fileHandle

FileHandle

theData

Text to write

callBackFunction

Callback subroutine

 

neoFileWriteFromURL

Purpose:

Write data from a URL to an external file using it's FileHandle


Please check CORS before using this command.

Category:

neoFileSystem

Syntax:

neoFileWriteFromURL [fileHandle] "dataURL" callBackFunction

 

fileHandle

FileHandle

dataURL

Source URL

callBackFunction

Callback subroutine

 

neoSetDropFileContainer

Purpose:

Enable a Container to accept dragged and dropped files.

Category:

neoFileSystem

Syntax:

neoSetDropFileContainer "objId" callBackFunction

 

objId

Drop target Container

callBackFunction

Callback subroutine

Created with the Personal Edition of HelpNDoc: Experience the power of a responsive website for your documentation