Module: 'brixy.fs.filesystem'

Methods

(static) fileList (folder, filteropt, filesOnlyopt) → {Array}

Returns array of File.

Parameters:
Name Type Attributes Default Description
folder Folder

Folder.

filter string | RegExp <optional>

Filter of the selected files. Eg. "*.jsx;*.jsxinc;*.js" (optional)

filesOnly boolean <optional>
false

If true, it skips folders. (optional)

Returns:
  • Array :
    • Array of selected files.
Source:

(static) folderList (folder) → {Array}

Returns array of Folders.

Parameters:
Name Type Description
folder Folder

Parent folder.

Returns:
  • Array :
    • Array of folders.
Source:

(static) openDialog (prompt, filterStringopt, multiselectopt) → {File|Array|null}

Opens the file-browsing dialog.

Parameters:
Name Type Attributes Default Description
prompt string

Prompt text of the dialog window.

filterString string <optional>

Filter of the showed files. String of Windows type is converted to a filter function on the OSX. (optional)

multiselect boolean <optional>
false

Allows selecting of multiple files. Default is false. (optional)

Returns:
  • File | Array | null :
    • Selected file or files.
Source:

(static) saveDialog (prompt, filterStringopt, fileopt) → {File|null}

Opens the file-browsing dialog.

Parameters:
Name Type Attributes Description
prompt string

Prompt text of the dialog window.

filterString string <optional>

Filter of the showed files. String of Windows type is converted to a filter function on the OSX. (optional)

file File <optional>

If is presented, the dialog shows the file. (optional)

Returns:
  • File | null :
    • Selected file.
Source: