File related methods
Methods
-
staticDuFile.exists(path){boolean}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 4956 -
Checks if the given path exists
Name Type Description pathstring optional The file path Returns:
Type Description boolean True or false -
staticDuFile.getSequenceNumber(path)
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 5161 -
Gets the number of a frame from an file/image sequence
The number must be right before the extension.Name Type Description pathstring The path of the frame -
staticDuFile.parseCSV(file, delimiter, textSeparator){Array.<string>|null}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 5098 -
Parses a CSV file
Name Type Default Description fileFile The file delimiterstring ',' optional The delimiter used textSeparatorstring '"' optional The separator for texts Returns:
Type Description Array.<string> | null The content (a two-dimensionnal Array) or null if the file couldn't be parsed -
staticDuFile.parseJSON(file){Object|null}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 5066 -
Parses a JSON file
Name Type Description fileFile The file Returns:
Type Description Object | null The content or null if the file couldn't be parsed -
staticDuFile.read(file, encoding){string}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 4985 -
Reads a whole file and return its content
Name Type Default Description fileFile | string The file encodingstring 'UTF-8' optional The text encoding Returns:
Type Description string The content -
staticDuFile.readFirstLine(file){string}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 4969 -
Reads the first line of a file and return its content
Name Type Description fileFile | string The file Returns:
Type Description string The content -
staticDuFile.saveDialog(prompt, filter, defaultExtension){File|null}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 5140 -
Shows the default save file dialog and returns the file selected by the user.
If the user ommits the extension, the default extension will be appended (Mac OS fix). Name Type Default Description promptstring The prompt text, displayed if the dialog allows a prompt. filterstring '' optional The file type filter (windows only) defaultExtensionstring '' optional The default extension Returns:
Type Description File | null The file or null if the user cancels -
staticDuFile.saveJSON(obj, file){boolean}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 5084 -
Saves a js object to a JSON file
Name Type Description objObject The object to save fileFile | string The file or URI Returns:
Type Description boolean true if the file has been correctly written -
staticDuFile.write(file, content, append, encoding){boolean}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 5005 -
Writes a text file
Name Type Default Description fileFile The file contentstring The content to write appendboolean false optional Appends instead of replacing encodingstring 'UTF-8' optional The text encoding Returns:
Type Description boolean true if the file has been correctly written -
staticDuFile.writeln(file, content, append, encoding){boolean}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 5037 -
Writes a line in a text file
Name Type Default Description fileFile The file contentstring The content to write appendboolean false optional Appends instead of replacing encodingstring 'UTF-8' optional The text encoding Returns:
Type Description boolean true if the file has been correctly written