Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Rev: 1381948887907

...

HTML Table
id
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Server Property Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)

Table Cell (td)
#servoyservoy.FileServerService.defaultFolder

HTML Table
id
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#appendToTXTFileappendToTXTFile(file, text)
Appends a string given in parameter to a file, using default platform encoding.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#appendToTXTFileappendToTXTFile(file, text, encoding)
Appends a string given in parameter to a file, using the specified encoding.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#appendToTXTFileappendToTXTFile(file, text)
Appends a string given in parameter to a file, using default platform encoding.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#appendToTXTFileappendToTXTFile(file, text, encoding)
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
#convertToJSFileconvertToJSFile(file)
Returns a JSFile instance corresponding to an alternative representation of a file (for example a string).
tbody
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
#convertToRemoteJSFileconvertToRemoteJSFile(path)
Convenience return to get a JSFile representation of a server file based on its path.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#copyFilecopyFile(source, destination)
Copies the source file to the destination file.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#copyFoldercopyFolder(source, destination)
Copies the sourcefolder to the destination folder, recursively.
tbody
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
#createFilecreateFile(targetFile)
Creates a JSFile instance.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#createFoldercreateFolder(destination)
Creates a folder on disk.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
#createTempFilecreateTempFile(prefix, suffix)
Creates a temporary file on disk.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#deleteFiledeleteFile(destination)
Removes a file from disk.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#deleteFolderdeleteFolder(destination, showWarning)
Deletes a folder from disk recursively.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getDefaultUploadLocationgetDefaultUploadLocation()
Returns the default upload location path of the server.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
#getDesktopFoldergetDesktopFolder()
Returns a JSFile instance that corresponds to the Desktop folder of the currently logged in user.
tbody
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getDiskListgetDiskList()
Returns an Array of JSFile instances correponding to the file system root folders.
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getFileSizegetFileSize(path)
Returns the size of the specified file.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getFolderContentsgetFolderContents(targetFolder)
Returns an array of JSFile instances corresponding to content of the specified folder.
tbody
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getFolderContentsgetFolderContents(targetFolder, fileFilter)
Returns an array of JSFile instances corresponding to content of the specified folder.
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getFolderContentsgetFolderContents(targetFolder, fileFilter, fileOption)
Returns an array of JSFile instances corresponding to content of the specified folder.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getFolderContentsgetFolderContents(targetFolder, fileFilter, fileOption, visibleOption)
Returns an array of JSFile instances corresponding to content of the specified folder.
tbody
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getFolderContentsgetFolderContents(targetFolder, fileFilter, fileOption, visibleOption, lockedOption)
Returns an array of JSFile instances corresponding to content of the specified folder.
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getFolderContentsgetFolderContents(targetFolder)
Returns an array of JSFile instances corresponding to content of the specified folder.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getFolderContentsgetFolderContents(targetFolder, fileFilter)
Returns an array of JSFile instances corresponding to content of the specified folder.
tbody
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getFolderContentsgetFolderContents(targetFolder, fileFilter, fileOption)
Returns an array of JSFile instances corresponding to content of the specified folder.
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getFolderContentsgetFolderContents(targetFolder, fileFilter, fileOption, visibleOption)
Returns an array of JSFile instances corresponding to content of the specified folder.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getFolderContentsgetFolderContents(targetFolder, fileFilter, fileOption, visibleOption, lockedOption)
Returns an array of JSFile instances corresponding to content of the specified folder.
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
#getHomeFoldergetHomeFolder()
Returns a JSFile instance corresponding to the home folder of the logged in used.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Date
Table Cell (td)
#getModificationDategetModificationDate(path)
Returns the modification date of a file.
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getRemoteFolderContentsgetRemoteFolderContents(targetFolder)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getRemoteFolderContentsgetRemoteFolderContents(targetFolder, fileFilter)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getRemoteFolderContentsgetRemoteFolderContents(targetFolder, fileFilter, fileOption)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getRemoteFolderContentsgetRemoteFolderContents(targetFolder, fileFilter, fileOption, visibleOption)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.
Table Body (tbody)
tbody
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getRemoteFolderContentsgetRemoteFolderContents(targetFolder, fileFilter, fileOption, visibleOption, lockedOption)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.
tbody
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getRemoteFolderContentsgetRemoteFolderContents(targetFolder)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getRemoteFolderContentsgetRemoteFolderContents(targetFolder, fileFilter)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getRemoteFolderContentsgetRemoteFolderContents(targetFolder, fileFilter, fileOption)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getRemoteFolderContentsgetRemoteFolderContents(targetFolder, fileFilter, fileOption, visibleOption)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
#getRemoteFolderContentsgetRemoteFolderContents(targetFolder, fileFilter, fileOption, visibleOption, lockedOption)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.
tbody
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#moveFilemoveFile(source, destination)
Moves the file from the source to the destination place.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
openFile(file)
Launches the associated application to open the file.
Table Row (tr)
Table Cell (td)
byte[]
Table Cell (td)
#readFilereadFile()
Reads all or part of the content from a binary file.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
byte[]
Table Cell (td)
#readFilereadFile(file)
Reads all or part of the content from a binary file.
tbody
Table Row (tr)
Table Cell (td)
byte[]
Table Cell (td)
#readFilereadFile(file, size)
Reads all or part of the content from a binary file.
Table Row (tr)
Table Cell (td)
byte[]
Table Cell (td)
#readFilereadFile(file)
Reads all or part of the content from a binary file.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
byte[]
Table Cell (td)
#readFilereadFile(file, size)
Reads all or part of the content from a binary file.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#readTXTFilereadTXTFile()
Read all content from a text file.
Table Body (tbody)
trtbody
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#readTXTFilereadTXTFile(file)
Read all content from a text file.
tbody
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#readTXTFilereadTXTFile(file, charsetname)
Read all content from a text file.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#readTXTFilereadTXTFile(file)
Read all content from a text file.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#readTXTFilereadTXTFile(file, charsetname)
Read all content from a text file.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
#showDirectorySelectDialogshowDirectorySelectDialog()
Shows a directory selector dialog.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
#showDirectorySelectDialogshowDirectorySelectDialog(directory)
Shows a directory selector dialog.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
#showDirectorySelectDialogshowDirectorySelectDialog(directory, title)
Shows a directory selector dialog.
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
#showDirectorySelectDialogshowDirectorySelectDialog(directory)
Shows a directory selector dialog.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
#showDirectorySelectDialogshowDirectorySelectDialog(directory, title)
Shows a directory selector dialog.
tbody
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog()
Shows a file open dialog.
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(selectionMode)
Shows a file open dialog.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(selectionMode, startDirectory)
Shows a file open dialog.
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(selectionMode, startDirectory, multiselect)
Shows a file open dialog.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(selectionMode, startDirectory, multiselect, filter)
Shows a file open dialog.
Table Body (tbody)
tbody
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(selectionMode, startDirectory, multiselect, filter, callbackfunction)
Shows a file open dialog.
tbody
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(selectionMode, startDirectory, multiselect, filter, callbackfunction, title)
Shows a file open dialog.
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(selectionMode, startDirectory, multiselect, callbackfunction)
Shows a file open dialog.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(selectionMode, startDirectory, callbackfunction)
Shows a file open dialog.
Table Body (tbody)
tbody
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(selectionMode, startDirectory)
Shows a file open dialog.
tbody
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(selectionMode, startDirectory, multiselect)
Shows a file open dialog.
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(selectionMode, startDirectory, multiselect, filter)
Shows a file open dialog.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(selectionMode, startDirectory, multiselect, filter, callbackfunction)
Shows a file open dialog.
tbody
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(selectionMode, startDirectory, multiselect, filter, callbackfunction, title)
Shows a file open dialog.
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(selectionMode, startDirectory, multiselect, callbackfunction)
Shows a file open dialog.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(selectionMode, startDirectory, callbackfunction)
Shows a file open dialog.
tbody
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(selectionMode, callbackfunction)
Shows a file open dialog.
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#showFileOpenDialogshowFileOpenDialog(callbackfunction)
Shows a file open dialog.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
#showFileSaveDialogshowFileSaveDialog()
Shows a file save dialog.
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
#showFileSaveDialogshowFileSaveDialog(fileNameDir)
Shows a file save dialog.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
#showFileSaveDialogshowFileSaveDialog(fileNameDir, title)
Shows a file save dialog.
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
#showFileSaveDialogshowFileSaveDialog(fileNameDir)
Shows a file save dialog.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
#showFileSaveDialogshowFileSaveDialog(fileNameDir, title)
Shows a file save dialog.
tbody
Table Row (tr)
Table Cell (td)
JSProgressMonitor
Table Cell (td)
#streamFilesFromServerstreamFilesFromServer(files, serverFiles)
Stream 1 or more files from the server to the client.
Table Row (tr)
Table Cell (td)
JSProgressMonitor
Table Cell (td)
#streamFilesFromServerstreamFilesFromServer(files, serverFiles, callback)
Stream 1 or more files from the server to the client, the callback method is invoked after every file, with as argument
the filename that was transfered.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSProgressMonitor
Table Cell (td)
#streamFilesToServerstreamFilesToServer(files)
Overloaded method, only defines file(s) to be streamed
tbody
Table Row (tr)
Table Cell (td)
JSProgressMonitor
Table Cell (td)
#streamFilesToServerstreamFilesToServer(files, serverFiles)
Overloaded method, defines file(s) to be streamed and a callback function
Table Row (tr)
Table Cell (td)
JSProgressMonitor
Table Cell (td)
#streamFilesToServerstreamFilesToServer(files, serverFiles, callback)
Overloaded method, defines file(s) to be streamed, a callback function and file name(s) to use on the server
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSProgressMonitor
Table Cell (td)
#streamFilesToServerstreamFilesToServer(files, callback)
Overloaded method, defines file(s) to be streamed and a callback function
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#writeFilewriteFile(file, data)
Writes data into a binary file.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#writeFilewriteFile(file, data, mimeType)
Writes data into a binary file.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#writeFilewriteFile(file, data)
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#writeFilewriteFile(file, data, mimeType)
Writes data into a binary file.
tbody
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#writeTXTFilewriteTXTFile(file, text_data)
Writes data into a text file.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#writeTXTFilewriteTXTFile(file, text_data, charsetname)
Writes data into a text file.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#writeTXTFilewriteTXTFile(file, text_data, charsetname, mimeType)
Writes data into a text file.
tbody
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#writeTXTFilewriteTXTFile(file, text_data)
Writes data into a text file.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#writeTXTFilewriteTXTFile(file, text_data, charsetname)
Writes data into a text file.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#writeTXTFilewriteTXTFile(file, text_data, charsetname, mimeType)
Writes data into a text file.
tbody
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#writeXMLFilewriteXMLFile(file, xml_data)
Writes data into an XML file.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#writeXMLFilewriteXMLFile(file, xml_data, encoding)
Writes data into an XML file.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#writeXMLFilewriteXMLFile(file, xml_data)
Writes data into an XML file.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#writeXMLFilewriteXMLFile(file, xml_data, encoding)
Writes data into an XML file.

HTML Table
idserverProperty
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Server Property Details
Table Body (tbody)
idservoy.FileServerService.defaultFolder
Table Row (tr)
idname
Table Cell (td)
servoy.FileServerService.defaultFolder
Table Row (tr)
classlastDetailRow
Table Cell (td)

HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details
Table Body (tbody)
idappendToTXTFile-JSFile_String
Table Row (tr)
idname
Table Cell (td)
appendToTXTFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
appendToTXTFile
Span
(file, text)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Appends a string given in parameter to a file, using default platform encoding.
Table Row (tr)
idsnc
Table Cell (td)
Since
Div
classsIndent
Servoy 5.2
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} file

...

- a local JSFile
{String} text

...

- the text to append to the file
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean

...

- true if appending worked
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// append some text to a text file:
	var ok = plugins.file.appendToTXTFile('myTextFile.txt', '\nMy fantastic new line of text\n');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idappendToTXTFile-JSFile_String_String
Table Row (tr)
idname
Table Cell (td)
appendToTXTFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
appendToTXTFile
Span
(file, text, encoding)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Appends a string given in parameter to a file, using the specified encoding.
Table Row (tr)
idsnc
Table Cell (td)
Since
Div
classsIndent
Servoy 5.2
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} file

...

- a local JSFile
{String} text

...

- the text to append to the file
{String} encoding

...

- the encoding to use
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean

...

- true if appending worked
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// append some text to a text file:
	var ok = plugins.file.appendToTXTFile('myTextFile.txt', '\nMy fantastic new line of text\n');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idappendToTXTFile-String_String
Table Row (tr)
idname
Table Cell (td)
appendToTXTFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
appendToTXTFile
Span
(file, text)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Appends a string given in parameter to a file, using default platform encoding.
Table Row (tr)
idsnc
Table Cell (td)
Since
Div
classsIndent
Servoy 5.2
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} file

...

- the file path as a String
{String} text

...

- the text to append to the file
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean

...

- true if appending worked
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// append some text to a text file:
	var ok = plugins.file.appendToTXTFile('myTextFile.txt', '\nMy fantastic new line of text\n');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idappendToTXTFile-String_String_String
Table Row (tr)
idname
Table Cell (td)
appendToTXTFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
appendToTXTFile
Span
(file, text, encoding)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} file

...

- the file path as a String
{String} text

...

- the text to append to the file
{String} encoding

...

- the encoding to use
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// append some text to a text file:
	var ok = plugins.file.appendToTXTFile('myTextFile.txt', '\nMy fantastic new line of text\n');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idconvertToJSFile-Object
Table Row (tr)
idname
Table Cell (td)
convertToJSFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile
Span
stylefont-weight: bold;
convertToJSFile
Span
(file)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns a JSFile instance corresponding to an alternative representation of a file (for example a string).
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object} file
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile

...

- JSFile
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var f = plugins.file.convertToJSFile("story.txt");
if (f.canRead())
	application.output("File can be read.");

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idconvertToRemoteJSFile-String
Table Row (tr)
idname
Table Cell (td)
convertToRemoteJSFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile
Span
stylefont-weight: bold;
convertToRemoteJSFile
Span
(path)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Convenience return to get a JSFile representation of a server file based on its path.
Table Row (tr)
idsnc
Table Cell (td)
Since
Div
classsIndent
Servoy 5.2
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} path

...

- the path representing a file on the server (should start with "/")
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile

...

- the JSFile
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var f = plugins.file.convertToRemoteJSFile('/story.txt');
if (f && f.canRead())
	application.output('File can be read.');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcopyFile-Object_Object
Table Row (tr)
idname
Table Cell (td)
copyFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
copyFile
Span
(source, destination)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Copies the source file to the destination file. Returns true if the copy succeeds, false if any error occurs.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object} source
{Object} destination
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// Copy based on file names.
if (!plugins.file.copyFile("story.txt", "story.txt.copy"))
	application.output("Copy failed.");
// Copy based on JSFile instances.
var f = plugins.file.createFile("story.txt");
var fcopy = plugins.file.createFile("story.txt.copy2");
if (!plugins.file.copyFile(f, fcopy))
	application.output("Copy failed.");

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcopyFolder-Object_Object
Table Row (tr)
idname
Table Cell (td)
copyFolder
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
copyFolder
Span
(source, destination)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Copies the sourcefolder to the destination folder, recursively. Returns true if the copy succeeds, false if any error occurs.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object} source
{Object} destination
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean

...

- success boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// Copy folder based on names.
if (!plugins.file.copyFolder("stories", "stories_copy"))
	application.output("Folder copy failed.");
// Copy folder based on JSFile instances.
var d = plugins.file.createFile("stories");
var dcopy = plugins.file.createFile("stories_copy_2");
if (!plugins.file.copyFolder(d, dcopy))
	application.output("Folder copy failed.");

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcreateFile-Object
Table Row (tr)
idname
Table Cell (td)
createFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile
Span
stylefont-weight: bold;
createFile
Span
(targetFile)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Creates a JSFile instance. Does not create the file on disk.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object} targetFile
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// Create the JSFile instance based on the file name.
var f = plugins.file.createFile("newfile.txt");
// Create the file on disk.
if (!f.createNewFile())
	application.output("The file could not be created.");

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcreateFolder-Object
Table Row (tr)
idname
Table Cell (td)
createFolder
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
createFolder
Span
(destination)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Creates a folder on disk. Returns true if the folder is successfully created, false if any error occurs.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object} destination
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var d = plugins.file.convertToJSFile("newfolder");
if (!plugins.file.createFolder(d))
	application.output("Folder could not be created.");

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcreateTempFile-String_String
Table Row (tr)
idname
Table Cell (td)
createTempFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile
Span
stylefont-weight: bold;
createTempFile
Span
(prefix, suffix)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Creates a temporary file on disk. A prefix and an extension are specified and they will be part of the file name.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} prefix
{String} suffix
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var tempFile = plugins.file.createTempFile('myfile','.txt');
application.output('Temporary file created as: ' + tempFile.getAbsolutePath());
plugins.file.writeTXTFile(tempFile, 'abcdefg');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
iddeleteFile-Object
Table Row (tr)
idname
Table Cell (td)
deleteFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
deleteFile
Span
(destination)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Removes a file from disk. Returns true on success, false otherwise.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object} destination
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

if (plugins.file.deleteFile('story.txt'))
	application.output('File deleted.');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
iddeleteFolder-Object_Boolean
Table Row (tr)
idname
Table Cell (td)
deleteFolder
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
deleteFolder
Span
(destination, showWarning)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Deletes a folder from disk recursively. Returns true on success, false otherwise. If the second parameter is set to true, then a warning will be issued to the user before actually removing the folder.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object} destination
{Boolean} showWarning
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

if (plugins.file.deleteFolder('stories', true))
	application.output('Folder deleted.');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetDefaultUploadLocation
Table Row (tr)
idname
Table Cell (td)
getDefaultUploadLocation
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getDefaultUploadLocation
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns the default upload location path of the server.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String

...

- the location as canonical path
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// get the (server-side) default upload location path:
var serverPath = plugins.file.getDefaultUploadLocation();

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetDesktopFolder
Table Row (tr)
idname
Table Cell (td)
getDesktopFolder
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile
Span
stylefont-weight: bold;
getDesktopFolder
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns a JSFile instance that corresponds to the Desktop folder of the currently logged in user.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var d = plugins.file.getDesktopFolder();
application.output('desktop folder is: ' + d.getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetDiskList
Table Row (tr)
idname
Table Cell (td)
getDiskList
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getDiskList
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an Array of JSFile instances correponding to the file system root folders.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var roots = plugins.file.getDiskList();
for (var i = 0; i < roots.length; i++)
	application.output(roots[i].getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetFileSize-Object
Table Row (tr)
idname
Table Cell (td)
getFileSize
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getFileSize
Span
(path)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns the size of the specified file.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object} path
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var f = plugins.file.convertToJSFile('story.txt');
application.output('file size: ' + plugins.file.getFileSize(f));

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetFolderContents-JSFile
Table Row (tr)
idname
Table Cell (td)
getFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getFolderContents
Span
(targetFolder)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} targetFolder

...

- JSFile object.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetFolderContents-JSFile_Object
Table Row (tr)
idname
Table Cell (td)
getFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getFolderContents
Span
(targetFolder, fileFilter)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} targetFolder

...

- JSFile object.
{Object} fileFilter

...

- Filter or array of filters for files in folder.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetFolderContents-JSFile_Object_Number
Table Row (tr)
idname
Table Cell (td)
getFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getFolderContents
Span
(targetFolder, fileFilter, fileOption)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} targetFolder

...

- JSFile object.
{Object} fileFilter

...

- Filter or array of filters for files in folder.
{Number} fileOption

...

- 1=files, 2=dirs
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetFolderContents-JSFile_Object_Number_Number
Table Row (tr)
idname
Table Cell (td)
getFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getFolderContents
Span
(targetFolder, fileFilter, fileOption, visibleOption)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} targetFolder

...

- JSFile object.
{Object} fileFilter

...

- Filter or array of filters for files in folder.
{Number} fileOption

...

- 1=files, 2=dirs
{Number} visibleOption

...

- 1=visible, 2=nonvisible
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetFolderContents-JSFile_Object_Number_Number_Number
Table Row (tr)
idname
Table Cell (td)
getFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getFolderContents
Span
(targetFolder, fileFilter, fileOption, visibleOption, lockedOption)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} targetFolder

...

- JSFile object.
{Object} fileFilter

...

- Filter or array of filters for files in folder.
{Number} fileOption

...

- 1=files, 2=dirs
{Number} visibleOption

...

- 1=visible, 2=nonvisible
{Number} lockedOption

...

- 1=locked, 2=nonlocked
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetFolderContents-String
Table Row (tr)
idname
Table Cell (td)
getFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getFolderContents
Span
(targetFolder)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} targetFolder

...

- File path.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetFolderContents-String_Object
Table Row (tr)
idname
Table Cell (td)
getFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getFolderContents
Span
(targetFolder, fileFilter)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} targetFolder

...

- File path.
{Object} fileFilter

...

- Filter or array of filters for files in folder.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetFolderContents-String_Object_Number
Table Row (tr)
idname
Table Cell (td)
getFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getFolderContents
Span
(targetFolder, fileFilter, fileOption)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} targetFolder

...

- File path.
{Object} fileFilter

...

- Filter or array of filters for files in folder.
{Number} fileOption

...

- 1=files, 2=dirs
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetFolderContents-String_Object_Number_Number
Table Row (tr)
idname
Table Cell (td)
getFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getFolderContents
Span
(targetFolder, fileFilter, fileOption, visibleOption)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} targetFolder

...

- File path.
{Object} fileFilter

...

- Filter or array of filters for files in folder.
{Number} fileOption

...

- 1=files, 2=dirs
{Number} visibleOption

...

- 1=visible, 2=nonvisible
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetFolderContents-String_Object_Number_Number_Number
Table Row (tr)
idname
Table Cell (td)
getFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getFolderContents
Span
(targetFolder, fileFilter, fileOption, visibleOption, lockedOption)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} targetFolder

...

- File path.
{Object} fileFilter

...

- Filter or array of filters for files in folder.
{Number} fileOption

...

- 1=files, 2=dirs
{Number} visibleOption

...

- 1=visible, 2=nonvisible
{Number} lockedOption

...

- 1=locked, 2=nonlocked
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetHomeFolder
Table Row (tr)
idname
Table Cell (td)
getHomeFolder
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile
Span
stylefont-weight: bold;
getHomeFolder
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns a JSFile instance corresponding to the home folder of the logged in used.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var d = plugins.file.getHomeFolder();
application.output('home folder: ' + d.getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetModificationDate-Object
Table Row (tr)
idname
Table Cell (td)
getModificationDate
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Date
Span
stylefont-weight: bold;
getModificationDate
Span
(path)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns the modification date of a file.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object} path
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Date
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var f = plugins.file.convertToJSFile('story.txt');
application.output('last changed: ' + plugins.file.getModificationDate(f));

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetRemoteFolderContents-JSFile
Table Row (tr)
idname
Table Cell (td)
getRemoteFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getRemoteFolderContents
Span
(targetFolder)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder on the server side. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idsnc
Table Cell (td)
Since
Div
classsIndent
Servoy 5.2.1
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} targetFolder
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]

...

- the array of file names
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetRemoteFolderContents-JSFile_Object
Table Row (tr)
idname
Table Cell (td)
getRemoteFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getRemoteFolderContents
Span
(targetFolder, fileFilter)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder on the server side. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} targetFolder

...

- Folder as JSFile object.
{Object} fileFilter

...

- Filter or array of filters for files in folder.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]

...

- the array of file names
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetRemoteFolderContents-JSFile_Object_Number
Table Row (tr)
idname
Table Cell (td)
getRemoteFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getRemoteFolderContents
Span
(targetFolder, fileFilter, fileOption)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder on the server side. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} targetFolder

...

- Folder as JSFile object.
{Object} fileFilter

...

- Filter or array of filters for files in folder.
{Number} fileOption

...

- 1=files, 2=dirs
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]

...

- the array of file names
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetRemoteFolderContents-JSFile_Object_Number_Number
Table Row (tr)
idname
Table Cell (td)
getRemoteFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getRemoteFolderContents
Span
(targetFolder, fileFilter, fileOption, visibleOption)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder on the server side. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} targetFolder

...

- Folder as JSFile object.
{Object} fileFilter

...

- Filter or array of filters for files in folder.
{Number} fileOption

...

- 1=files, 2=dirs
{Number} visibleOption

...

- 1=visible, 2=nonvisible
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]

...

- the array of file names
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetRemoteFolderContents-JSFile_Object_Number_Number_Number
Table Row (tr)
idname
Table Cell (td)
getRemoteFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getRemoteFolderContents
Span
(targetFolder, fileFilter, fileOption, visibleOption, lockedOption)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder on the server side. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} targetFolder

...

- Folder as JSFile object.
{Object} fileFilter

...

- Filter or array of filters for files in folder.
{Number} fileOption

...

- 1=files, 2=dirs
{Number} visibleOption

...

- 1=visible, 2=nonvisible
{Number} lockedOption

...

- 1=locked, 2=nonlocked
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]

...

- the array of file names
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetRemoteFolderContents-String
Table Row (tr)
idname
Table Cell (td)
getRemoteFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getRemoteFolderContents
Span
(targetFolder)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder on the server side. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} targetFolder

...

- Folder path.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]

...

- the array of file names
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetRemoteFolderContents-String_Object
Table Row (tr)
idname
Table Cell (td)
getRemoteFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getRemoteFolderContents
Span
(targetFolder, fileFilter)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder on the server side. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} targetFolder

...

- Folder path.
{Object} fileFilter

...

- Filter or array of filters for files in folder.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]

...

- the array of file names
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetRemoteFolderContents-String_Object_Number
Table Row (tr)
idname
Table Cell (td)
getRemoteFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getRemoteFolderContents
Span
(targetFolder, fileFilter, fileOption)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder on the server side. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} targetFolder

...

- Folder path.
{Object} fileFilter

...

- Filter or array of filters for files in folder.
{Number} fileOption

...

- 1=files, 2=dirs
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]

...

- the array of file names
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetRemoteFolderContents-String_Object_Number_Number
Table Row (tr)
idname
Table Cell (td)
getRemoteFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getRemoteFolderContents
Span
(targetFolder, fileFilter, fileOption, visibleOption)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder on the server side. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} targetFolder

...

- Folder path.
{Object} fileFilter

...

- Filter or array of filters for files in folder.
{Number} fileOption

...

- 1=files, 2=dirs
{Number} visibleOption

...

- 1=visible, 2=nonvisible
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]

...

- the array of file names
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetRemoteFolderContents-String_Object_Number_Number_Number
Table Row (tr)
idname
Table Cell (td)
getRemoteFolderContents
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile[]
Span
stylefont-weight: bold;
getRemoteFolderContents
Span
(targetFolder, fileFilter, fileOption, visibleOption, lockedOption)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of JSFile instances corresponding to content of the specified folder on the server side. The content can be filtered by optional name filter(s), by type, by visibility and by lock status.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} targetFolder

...

- Folder path.
{Object} fileFilter

...

- Filter or array of filters for files in folder.
{Number} fileOption

...

- 1=files, 2=dirs
{Number} visibleOption

...

- 1=visible, 2=nonvisible
{Number} lockedOption

...

- 1=locked, 2=nonlocked
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile[]

...

- the array of file names
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idmoveFile-Object_Object
Table Row (tr)
idname
Table Cell (td)
moveFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
moveFile
Span
(source, destination)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Moves the file from the source to the destination place. Returns true on success, false otherwise.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object} source
{Object} destination
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// Move file based on names.
if (!plugins.file.moveFile('story.txt','story.txt.new'))
	application.output('File move failed.');
// Move file based on JSFile instances.
var f = plugins.file.convertToJSFile('story.txt.new');
var fmoved = plugins.file.convertToJSFile('story.txt');
if (!plugins.file.moveFile(f, fmoved))
	application.output('File move 

...

back failed.');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idopenFile-JSFile
Table Row (tr)
idname
Table Cell (td)
openFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
openFile
Span
(file)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Launches the associated application to open the file.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} file
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean - success status of the open operation
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var myPDF = plugins.file.createFile('my.pdf');
 myPDF.setBytes(data, true)
	plugins.file.openFile(myPDF);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idreadFile
Table Row (tr)
idname
Table Cell (td)
readFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
byte[]
Span
stylefont-weight: bold;
readFile
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Reads all or part of the content from a binary file. If a file name is not specified, then a file selection dialog pops up for selecting a file. (Web Enabled only for a JSFile argument)
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
byte[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// Read all content from the file.
var bytes = plugins.file.readFile('big.jpg');
application.output('file size: ' + bytes.length);
// Read only the first 1KB from the file.
var bytesPartial = plugins.file.readFile('big.jpg', 1024);
application.output('partial file size: ' + bytesPartial.length);
// Read all content from a file selected from the file open dialog.
var bytesUnknownFile = plugins.file.readFile();
application.output('unknown file size: ' + bytesUnknownFile.length);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idreadFile-JSFile
Table Row (tr)
idname
Table Cell (td)
readFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
byte[]
Span
stylefont-weight: bold;
readFile
Span
(file)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Reads all or part of the content from a binary file. If a file name is not specified, then a file selection dialog pops up for selecting a file. (Web Enabled only for a JSFile argument)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} file

...

- JSFile.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
byte[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// Read all content from the file.
var bytes = plugins.file.readFile('big.jpg');
application.output('file size: ' + bytes.length);
// Read only the first 1KB from the file.
var bytesPartial = plugins.file.readFile('big.jpg', 1024);
application.output('partial file size: ' + bytesPartial.length);
// Read all content from a file selected from the file open dialog.
var bytesUnknownFile = plugins.file.readFile();
application.output('unknown file size: ' + bytesUnknownFile.length);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idreadFile-JSFile_Number
Table Row (tr)
idname
Table Cell (td)
readFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
byte[]
Span
stylefont-weight: bold;
readFile
Span
(file, size)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Reads all or part of the content from a binary file. If a file name is not specified, then a file selection dialog pops up for selecting a file. (Web Enabled only for a JSFile argument)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} file

...

- JSFile.
{Number} size

...

- Number of bytes to read.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
byte[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// Read all content from the file.
var bytes = plugins.file.readFile('big.jpg');
application.output('file size: ' + bytes.length);
// Read only the first 1KB from the file.
var bytesPartial = plugins.file.readFile('big.jpg', 1024);
application.output('partial file size: ' + bytesPartial.length);
// Read all content from a file selected from the file open dialog.
var bytesUnknownFile = plugins.file.readFile();
application.output('unknown file size: ' + bytesUnknownFile.length);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idreadFile-String
Table Row (tr)
idname
Table Cell (td)
readFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
byte[]
Span
stylefont-weight: bold;
readFile
Span
(file)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Reads all or part of the content from a binary file. If a file name is not specified, then a file selection dialog pops up for selecting a file. (Web Enabled only for a JSFile argument)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} file

...

- the file path.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
byte[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// Read all content from the file.
var bytes = plugins.file.readFile('big.jpg');
application.output('file size: ' + bytes.length);
// Read only the first 1KB from the file.
var bytesPartial = plugins.file.readFile('big.jpg', 1024);
application.output('partial file size: ' + bytesPartial.length);
// Read all content from a file selected from the file open dialog.
var bytesUnknownFile = plugins.file.readFile();
application.output('unknown file size: ' + bytesUnknownFile.length);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idreadFile-String_Number
Table Row (tr)
idname
Table Cell (td)
readFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
byte[]
Span
stylefont-weight: bold;
readFile
Span
(file, size)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Reads all or part of the content from a binary file. If a file name is not specified, then a file selection dialog pops up for selecting a file. (Web Enabled only for a JSFile argument)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} file

...

- the file path.
{Number} size

...

- Number of bytes to read.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
byte[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// Read all content from the file.
var bytes = plugins.file.readFile('big.jpg');
application.output('file size: ' + bytes.length);
// Read only the first 1KB from the file.
var bytesPartial = plugins.file.readFile('big.jpg', 1024);
application.output('partial file size: ' + bytesPartial.length);
// Read all content from a file selected from the file open dialog.
var bytesUnknownFile = plugins.file.readFile();
application.output('unknown file size: ' + bytesUnknownFile.length);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idreadTXTFile
Table Row (tr)
idname
Table Cell (td)
readTXTFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
readTXTFile
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Read all content from a text file. If a file name is not specified, then a file selection dialog pops up for selecting a file. The encoding can be also specified. (Web Enabled only for a JSFile argument)
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// Read content from a known text file.
var txt = plugins.file.readTXTFile('story.txt');
application.output(txt);
// Read content from a text file selected from the file open dialog.
var txtUnknown = plugins.file.readTXTFile();
application.output(txtUnknown);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idreadTXTFile-JSFile
Table Row (tr)
idname
Table Cell (td)
readTXTFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
readTXTFile
Span
(file)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Read all content from a text file. If a file name is not specified, then a file selection dialog pops up for selecting a file. The encoding can be also specified. (Web Enabled only for a JSFile argument)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} file

...

- JSFile.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// Read content from a known text file.
var txt = plugins.file.readTXTFile('story.txt');
application.output(txt);
// Read content from a text file selected from the file open dialog.
var txtUnknown = plugins.file.readTXTFile();
application.output(txtUnknown);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idreadTXTFile-JSFile_String
Table Row (tr)
idname
Table Cell (td)
readTXTFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
readTXTFile
Span
(file, charsetname)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Read all content from a text file. If a file name is not specified, then a file selection dialog pops up for selecting a file. The encoding can be also specified. (Web Enabled only for a JSFile argument)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} file

...

- JSFile.
{String} charsetname

...

- Charset name.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// Read content from a known text file.
var txt = plugins.file.readTXTFile('story.txt');
application.output(txt);
// Read content from a text file selected from the file open dialog.
var txtUnknown = plugins.file.readTXTFile();
application.output(txtUnknown);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idreadTXTFile-String
Table Row (tr)
idname
Table Cell (td)
readTXTFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
readTXTFile
Span
(file)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Read all content from a text file. If a file name is not specified, then a file selection dialog pops up for selecting a file. The encoding can be also specified. (Web Enabled only for a JSFile argument)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} file

...

- the file path.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// Read content from a known text file.
var txt = plugins.file.readTXTFile('story.txt');
application.output(txt);
// Read content from a text file selected from the file open dialog.
var txtUnknown = plugins.file.readTXTFile();
application.output(txtUnknown);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idreadTXTFile-String_String
Table Row (tr)
idname
Table Cell (td)
readTXTFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
readTXTFile
Span
(file, charsetname)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Read all content from a text file. If a file name is not specified, then a file selection dialog pops up for selecting a file. The encoding can be also specified. (Web Enabled only for a JSFile argument)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} file

...

- the file path.
{String} charsetname

...

- Charset name.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// Read content from a known text file.
var txt = plugins.file.readTXTFile('story.txt');
application.output(txt);
// Read content from a text file selected from the file open dialog.
var txtUnknown = plugins.file.readTXTFile();
application.output(txtUnknown);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowDirectorySelectDialog
Table Row (tr)
idname
Table Cell (td)
showDirectorySelectDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile
Span
stylefont-weight: bold;
showDirectorySelectDialog
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a directory selector dialog.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var dir = plugins.file.showDirectorySelectDialog();
application.output("you've selected folder: " + dir.getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowDirectorySelectDialog-JSFile
Table Row (tr)
idname
Table Cell (td)
showDirectorySelectDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile
Span
stylefont-weight: bold;
showDirectorySelectDialog
Span
(directory)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a directory selector dialog.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} directory

...

- Default directory as JSFile.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var dir = plugins.file.showDirectorySelectDialog();
application.output("you've selected folder: " + dir.getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowDirectorySelectDialog-JSFile_String
Table Row (tr)
idname
Table Cell (td)
showDirectorySelectDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile
Span
stylefont-weight: bold;
showDirectorySelectDialog
Span
(directory, title)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a directory selector dialog.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} directory

...

- Default directory as JSFile.
{String} title

...

- Dialog title.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var dir = plugins.file.showDirectorySelectDialog();
application.output("you've selected folder: " + dir.getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowDirectorySelectDialog-String
Table Row (tr)
idname
Table Cell (td)
showDirectorySelectDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile
Span
stylefont-weight: bold;
showDirectorySelectDialog
Span
(directory)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a directory selector dialog.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} directory

...

- Default directory as file path.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var dir = plugins.file.showDirectorySelectDialog();
application.output("you've selected folder: " + dir.getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowDirectorySelectDialog-String_String
Table Row (tr)
idname
Table Cell (td)
showDirectorySelectDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile
Span
stylefont-weight: bold;
showDirectorySelectDialog
Span
(directory, title)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a directory selector dialog.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} directory

...

- Default directory as file path.
{String} title

...

- Dialog title.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var dir = plugins.file.showDirectorySelectDialog();
application.output("you've selected folder: " + dir.getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Number
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(selectionMode)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} selectionMode

...

- 0=both,1=Files,2=Dirs
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Number_JSFile
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(selectionMode, startDirectory)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} selectionMode

...

- 0=both,1=Files,2=Dirs
{JSFile} startDirectory

...

- JSFile instance of default folder; null=default/previous
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Number_JSFile_Boolean
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(selectionMode, startDirectory, multiselect)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} selectionMode

...

- 0=both,1=Files,2=Dirs
{JSFile} startDirectory

...

- JSFile instance of default folder, null=default/previous
{Boolean} multiselect

...

- true/false
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Number_JSFile_Boolean_Object
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(selectionMode, startDirectory, multiselect, filter)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} selectionMode

...

- 0=both,1=Files,2=Dirs
{JSFile} startDirectory

...

- JSFile instance of default folder,null=default/previous
{Boolean} multiselect

...

- true/false
{Object} filter

...

- A filter or array of filters on the folder files.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.

...

showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Number_JSFile_Boolean_Object_Function
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(selectionMode, startDirectory, multiselect, filter, callbackfunction)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} selectionMode

...

- 0=both,1=Files,2=Dirs
{JSFile} startDirectory

...

- JSFile instance of default folder,null=default/previous
{Boolean} multiselect

...

- true/false
{Object} filter

...

- A filter or array of filters on the folder files.
{Function} callbackfunction

...

- A function that takes the (JSFile) array of the selected files as first argument
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Number_JSFile_Boolean_Object_Function_String
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(selectionMode, startDirectory, multiselect, filter, callbackfunction, title)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} selectionMode

...

- 0=both,1=Files,2=Dirs
{JSFile} startDirectory

...

- JSFile instance of default folder, null=default/previous
{Boolean} multiselect

...

- true/false
{Object} filter

...

- A filter or array of filters on the folder files.
{Function} callbackfunction

...

- A function that takes the (JSFile) array of the selected files as first argument
{String} title

...

- The tile of the dialog
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Number_JSFile_Boolean_Function
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(selectionMode, startDirectory, multiselect, callbackfunction)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} selectionMode

...

- 0=both,1=Files,2=Dirs
{JSFile} startDirectory

...

- JSFile instance of default folder,null=default/previous
{Boolean} multiselect

...

- true/false
{Function} callbackfunction

...

- A function that takes the (JSFile) array of the selected files as first argument
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Number_JSFile_Function
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(selectionMode, startDirectory, callbackfunction)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} selectionMode

...

- 0=both,1=Files,2=Dirs
{JSFile} startDirectory

...

- JSFile instance of default folder,null=default/previous
{Function} callbackfunction

...

- A function that takes the (JSFile) array of the selected files as first argument
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Number_String
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(selectionMode, startDirectory)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} selectionMode

...

- 0=both,1=Files,2=Dirs
{String} startDirectory

...

- Path to default folder; null=default/previous
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Number_String_Boolean
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(selectionMode, startDirectory, multiselect)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} selectionMode

...

- 0=both,1=Files,2=Dirs
{String} startDirectory

...

- Path to default folder, null=default/previous
{Boolean} multiselect

...

- true/false
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog

...

(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Number_String_Boolean_Object
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(selectionMode, startDirectory, multiselect, filter)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} selectionMode

...

- 0=both,1=Files,2=Dirs
{String} startDirectory

...

- Path to default folder,null=default/previous
{Boolean} multiselect

...

- true/false
{Object} filter

...

- A filter or array of filters on the folder files.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Number_String_Boolean_Object_Function
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(selectionMode, startDirectory, multiselect, filter, callbackfunction)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} selectionMode

...

- 0=both,1=Files,2=Dirs
{String} startDirectory

...

- Path to default folder,null=default/previous
{Boolean} multiselect

...

- true/false
{Object} filter

...

- A filter or array of filters on the folder files.
{Function} callbackfunction

...

- A function that takes the (JSFile) array of the selected files as first argument
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Number_String_Boolean_Object_Function_String
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(selectionMode, startDirectory, multiselect, filter, callbackfunction, title)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} selectionMode

...

- 0=both,1=Files,2=Dirs
{String} startDirectory

...

- Path to default folder, null=default/previous
{Boolean} multiselect

...

- true/false
{Object} filter

...

- A filter or array of filters on the folder files.
{Function} callbackfunction

...

- A function that takes the (JSFile) array of the selected files as first argument
{String} title

...

- The tile of the dialog
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Number_String_Boolean_Function
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(selectionMode, startDirectory, multiselect, callbackfunction)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} selectionMode

...

- 0=both,1=Files,2=Dirs
{String} startDirectory

...

- Path to default folder,null=default/previous
{Boolean} multiselect

...

- true/false
{Function} callbackfunction

...

- A function that takes the (JSFile) array of the selected files as first argument
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Number_String_Function
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(selectionMode, startDirectory, callbackfunction)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} selectionMode

...

- 0=both,1=Files,2=Dirs
{String} startDirectory

...

- Path to default folder,null=default/previous
{Function} callbackfunction

...

- A function that takes the (JSFile) array of the selected files as first argument
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Number_Function
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(selectionMode, callbackfunction)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} selectionMode

...

- 0=both,1=Files,2=Dirs
{Function} callbackfunction

...

- A function that takes the (JSFile) array of the selected files as first argument
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileOpenDialog-Function
Table Row (tr)
idname
Table Cell (td)
showFileOpenDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
showFileOpenDialog
Span
(callbackfunction)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file open dialog. Filters can be applied on what type of files can be selected. (Web Enabled, you must set the callback method for this to work)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Function} callbackfunction

...

- A function that takes the (JSFile) array of the selected files as first argument
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// This selects only files ('1'), previous dir must be used ('null'), no multiselect ('false') and
// the filter "JPG and GIF" should be used: ('new Array("JPG and GIF","jpg","gif")').
/** @type {JSFile} */
var f = plugins.file.showFileOpenDialog(1, null, false, new Array("JPG and GIF", "jpg", "gif"));
application.output('File: ' + f.getName());
application.output('is dir: ' + f.isDirectory());
application.output('is file: ' + f.isFile());
application.output('path: ' + f.getAbsolutePath());

// This allows mutliple selection of files, using previous dir and the same filter as above. This also casts the result to the JSFile type using JSDoc.
// if filters are specified, "all file" filter will not show up unless "*" filter is present
/** @type {JSFile[]} */
var files = plugins.file.showFileOpenDialog(1, null, true, new Array("JPG and GIF", "jpg", "gif", "*"));
for (var i = 0; i < files.length; i++)
{
	 application.output('File: ' + files[i].getName());
	 application.output('content type: ' + files[i].getContentType());
	 application.output('last modified: ' + files[i].lastModified());
	 application.output('size: ' + files[i].size());
}
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
plugins.file.showFileOpenDialog(null,null,false,new Array("JPG and GIF", "jpg", "gif"),mycallbackfunction,'Select some nice files')

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileSaveDialog
Table Row (tr)
idname
Table Cell (td)
showFileSaveDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile
Span
stylefont-weight: bold;
showFileSaveDialog
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file save dialog.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var file = plugins.file.showFileSaveDialog();
application.output("you've selected file: " + file.getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileSaveDialog-JSFile
Table Row (tr)
idname
Table Cell (td)
showFileSaveDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile
Span
stylefont-weight: bold;
showFileSaveDialog
Span
(fileNameDir)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file save dialog.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} fileNameDir

...

- JSFile to save.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var file = plugins.file.showFileSaveDialog();
application.output("you've selected file: " + file.getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileSaveDialog-JSFile_String
Table Row (tr)
idname
Table Cell (td)
showFileSaveDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile
Span
stylefont-weight: bold;
showFileSaveDialog
Span
(fileNameDir, title)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file save dialog.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} fileNameDir

...

- JSFile to save
{String} title

...

- Dialog title.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var file = plugins.file.showFileSaveDialog();
application.output("you've selected file: " + file.getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileSaveDialog-String
Table Row (tr)
idname
Table Cell (td)
showFileSaveDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile
Span
stylefont-weight: bold;
showFileSaveDialog
Span
(fileNameDir)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file save dialog.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} fileNameDir

...

- File (give as file path) to save.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var file = plugins.file.showFileSaveDialog();
application.output("you've selected file: " + file.getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idshowFileSaveDialog-String_String
Table Row (tr)
idname
Table Cell (td)
showFileSaveDialog
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSFile
Span
stylefont-weight: bold;
showFileSaveDialog
Span
(fileNameDir, title)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows a file save dialog.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} fileNameDir

...

- File to save (specified as file path)
{String} title

...

- Dialog title.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSFile
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var file = plugins.file.showFileSaveDialog();
application.output("you've selected file: " + file.getAbsolutePath());

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idstreamFilesFromServer-Object_Object
Table Row (tr)
idname
Table Cell (td)
streamFilesFromServer
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSProgressMonitor
Span
stylefont-weight: bold;
streamFilesFromServer
Span
(files, serverFiles)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Stream 1 or more files from the server to the client.
Table Row (tr)
idsnc
Table Cell (td)
Since
Div
classsIndent
Servoy 5.2
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object} files

...

- file(s) to be streamed into (can be a String path a JSFile) or an Array of these
{Object} serverFiles

...

- the files on the server that will be transfered to the client, can be a String or a String[]
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSProgressMonitor

...

- a JSProgressMonitor object to allow client to subscribe to progress notifications
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// transfer all the files of a chosen server folder to a directory on the client
var dir = plugins.file.showDirectorySelectDialog();
if (dir) {
	var list = plugins.file.getRemoteFolderContents('/images/user1/', null, 1);
	if (list) {
		var monitor = plugins.file.streamFilesFromServer(dir, list, callbackFunction);
	}
}

// transfer one file on the client
var monitor = plugins.file.streamFilesFromServer('/path/to/file', 'path/to/serverFile', callbackFunction);

// transfer an array of serverFiles to an array of files on the client
var files = new Array();
files[0] = '/path/to/file1';
files[1] = '/path/to/file2';
var serverFiles = new Array();
serverFiles[0] = '/path/to/serverFile1';
serverFiles[1] = '/path/to/serverFile2';
var monitor = plugins.file.streamFilesFromServer(files, serverFiles, callbackFunction);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idstreamFilesFromServer-Object_Object_Function
Table Row (tr)
idname
Table Cell (td)
streamFilesFromServer
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSProgressMonitor
Span
stylefont-weight: bold;
streamFilesFromServer
Span
(files, serverFiles, callback)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Stream 1 or more files from the server to the client, the callback method is invoked after every file, with as argument
the filename that was transfered. An extra second exception parameter can be given if an exception did occur.
Table Row (tr)
idsnc
Table Cell (td)
Since
Div
classsIndent
Servoy 5.2
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object} files

...

- file(s) to be streamed into (can be a String path or a JSFile) or an Array of these
{Object} serverFiles

...

- the files on the server that will be transfered to the client, can be a JSFile or JSFile[], a String or String[]
{Function} callback

...

- the Function to be called back at the end of the process (for every file); the callback function is invoked with argument the filename that was transfered; an extra second exception parameter can be given if an exception occured
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSProgressMonitor

...

- a JSProgressMonitor object to allow client to subscribe to progress notifications
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// transfer all the files of a chosen server folder to a directory on the client
var dir = plugins.file.showDirectorySelectDialog();
if (dir) {
	var list = plugins.file.getRemoteFolderContents('/images/user1/', null, 1);
	if (list) {
		var monitor = plugins.file.streamFilesFromServer(dir, list, callbackFunction);
	}
}

// transfer one file on the client
var monitor = plugins.file.streamFilesFromServer('/path/to/file', 'path/to/serverFile', callbackFunction);

// transfer an array of serverFiles to an array of files on the client
var files = new Array();
files[0] = '/path/to/file1';
files[1] = '/path/to/file2';
var serverFiles = new Array();
serverFiles[0] = '/path/to/serverFile1';
serverFiles[1] = '/path/to/serverFile2';
var monitor = plugins.file.streamFilesFromServer(files, serverFiles, callbackFunction);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idstreamFilesToServer-Object
Table Row (tr)
idname
Table Cell (td)
streamFilesToServer
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSProgressMonitor
Span
stylefont-weight: bold;
streamFilesToServer
Span
(files)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Overloaded method, only defines file(s) to be streamed
Table Row (tr)
idsnc
Table Cell (td)
Since
Div
classsIndent
Servoy 5.2
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object} files

...

- file(s) to be streamed (can be a String path or a JSFile) or an Array of these
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSProgressMonitor

...

- a JSProgressMonitor object to allow client to subscribe to progress notifications
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// send one file:
var file = plugins.file.showFileOpenDialog( 1, null, false, null, null, 'Choose a file to transfer' );
if (file) {
	plugins.file.streamFilesToServer( file, callbackFunction );
}
//plugins.file.streamFilesToServer( 'servoy.txt', callbackFunction );

// send an array of files:
var folder = plugins.file.showDirectorySelectDialog();
if (folder) {
	var files = plugins.file.getFolderContents(folder);
	if (files) {
		var monitor = plugins.file.streamFilesToServer( files, callbackFunction );
	}
}
// var files = new Array()
// files[0] = 'file1.txt';
// files[1] = 'file2.txt';
// var monitor = plugins.file.streamFilesToServer( files, callbackFunction );

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idstreamFilesToServer-Object_Object
Table Row (tr)
idname
Table Cell (td)
streamFilesToServer
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSProgressMonitor
Span
stylefont-weight: bold;
streamFilesToServer
Span
(files, serverFiles)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Overloaded method, defines file(s) to be streamed and a callback function
Table Row (tr)
idsnc
Table Cell (td)
Since
Div
classsIndent
Servoy 5.2
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object} files

...

- file(s) to be streamed (can be a String path or a JSFile) or an Array of these
{Object} serverFiles

...

- can be a JSFile or JSFile[], a String or String[], representing the file name(s) to use on the server
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSProgressMonitor

...

- a JSProgressMonitor object to allow client to subscribe to progress notifications
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// send one file:
var file = plugins.file.showFileOpenDialog( 1, null, false, null, null, 'Choose a file to transfer' );
if (file) {
	plugins.file.streamFilesToServer( file, callbackFunction );
}
//plugins.file.streamFilesToServer( 'servoy.txt', callbackFunction );

// send an array of files:
var folder = plugins.file.showDirectorySelectDialog();
if (folder) {
	var files = plugins.file.getFolderContents(folder);
	if (files) {
		var monitor = plugins.file.streamFilesToServer( files, callbackFunction );
	}
}
// var files = new Array()
// files[0] = 'file1.txt';
// files[1] = 'file2.txt';
// var monitor = plugins.file.streamFilesToServer( files, callbackFunction );

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idstreamFilesToServer-Object_Object_Function
Table Row (tr)
idname
Table Cell (td)
streamFilesToServer
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSProgressMonitor
Span
stylefont-weight: bold;
streamFilesToServer
Span
(files, serverFiles, callback)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Overloaded method, defines file(s) to be streamed, a callback function and file name(s) to use on the server
Table Row (tr)
idsnc
Table Cell (td)
Since
Div
classsIndent
Servoy 5.2
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object} files

...

- file(s) to be streamed (can be a String path or a JSFile) or an Array of these)
{Object} serverFiles

...

- can be a JSFile or JSFile[], a String or String[], representing the file name(s) to use on the server
{Function} callback

...

- the Function to be called back at the end of the process (for every file); the callback function is invoked with argument the filename that was transfered; an extra second exception parameter can be given if an exception occured
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSProgressMonitor

...

- a JSProgressMonitor object to allow client to subscribe to progress notifications
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// send one file:
var file = plugins.file.showFileOpenDialog( 1, null, false, null, null, 'Choose a file to transfer' );
if (file) {
	plugins.file.streamFilesToServer( file, callbackFunction );
}
//plugins.file.streamFilesToServer( 'servoy.txt', callbackFunction );

// send an array of files:
var folder = plugins.file.showDirectorySelectDialog();
if (folder) {
	var files = plugins.file.getFolderContents(folder);
	if (files) {
		var monitor = plugins.file.streamFilesToServer( files, callbackFunction );
	}
}
// var files = new Array()
// files[0] = 'file1.txt';
// files[1] = 'file2.txt';
// var monitor = plugins.file.streamFilesToServer( files, callbackFunction );

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idstreamFilesToServer-Object_Function
Table Row (tr)
idname
Table Cell (td)
streamFilesToServer
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSProgressMonitor
Span
stylefont-weight: bold;
streamFilesToServer
Span
(files, callback)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Overloaded method, defines file(s) to be streamed and a callback function
Table Row (tr)
idsnc
Table Cell (td)
Since
Div
classsIndent
Servoy 5.2
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object} files

...

- file(s) to be streamed (can be a String path or a JSFile) or an Array of these
{Function} callback

...

- the Function to be called back at the end of the process (for every file); the callback function is invoked with argument the filename that was transfered; an extra second exception parameter can be given if an exception occured
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSProgressMonitor

...

- a JSProgressMonitor object to allow client to subscribe to progress notifications
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// send one file:
var file = plugins.file.showFileOpenDialog( 1, null, false, null, null, 'Choose a file to transfer' );
if (file) {
	plugins.file.streamFilesToServer( file, callbackFunction );
}
//plugins.file.streamFilesToServer( 'servoy.txt', callbackFunction );

// send an array of files:
var folder = plugins.file.showDirectorySelectDialog();
if (folder) {
	var files = plugins.file.getFolderContents(folder);
	if (files) {
		var monitor = plugins.file.streamFilesToServer( files, callbackFunction );
	}
}
// var files = new Array()
// files[0] = 'file1.txt';
// files[1] = 'file2.txt';
// var monitor = plugins.file.streamFilesToServer( files, callbackFunction );

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idwriteFile-JSFile_byteArray
Table Row (tr)
idname
Table Cell (td)
writeFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
writeFile
Span
(file, data)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Writes data into a binary file. (Web Enabled: file parameter can be a string 'mypdffile.pdf' to hint the browser what it is, if it is a JSFile instance it will be saved on the server)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} file

...

- a local JSFile
{byte[]} data

...

- the data to be written
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

/**@type {Array<byte>}*/
var bytes = new Array();
for (var i=0; i<1024; i++)
	bytes[i] = i % 100;
var f = plugins.file.convertToJSFile('bin.dat');
if (!plugins.file.writeFile(f, bytes))
	application.output('Failed to write the file.');
// mimeType variable can be left null, and is used for webclient only. Specify one of any valid mime types as referenced here: http://www.w3schools.com/media/media_mimeref.asp'
var mimeType = 'application/vnd.ms-excel'
if (!plugins.file.writeFile(f, bytes, mimeType))
	application.output('Failed to write the file.');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idwriteFile-JSFile_byteArray_String
Table Row (tr)
idname
Table Cell (td)
writeFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
writeFile
Span
(file, data, mimeType)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Writes data into a binary file. (Web Enabled: file parameter can be a string 'mypdffile.pdf' to hint the browser what it is, if it is a JSFile instance it will be saved on the server)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} file

...

- a local JSFile
{byte[]} data

...

- the data to be written
{String} mimeType

...

- the mime type
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

/**@type {Array<byte>}*/
var bytes = new Array();
for (var i=0; i<1024; i++)
	bytes[i] = i % 100;
var f = plugins.file.convertToJSFile('bin.dat');
if (!plugins.file.writeFile(f, bytes))
	application.output('Failed to write the file.');
// mimeType variable can be left null, and is used for webclient only. Specify one of any valid mime types as referenced here: http://www.w3schools.com/media/media_mimeref.asp'
var mimeType = 'application/vnd.ms-excel'
if (!plugins.file.writeFile(f, bytes, mimeType))
	application.output('Failed to write the file.');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idwriteFile-String_byteArray
Table Row (tr)
idname
Table Cell (td)
writeFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
writeFile
Span
(file, data)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} file

...

- the file path as a String
{byte[]} data

...

- the data to be written
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

/**@type {Array<byte>}*/
var bytes = new Array();
for (var i=0; i<1024; i++)
	bytes[i] = i % 100;
var f = plugins.file.convertToJSFile('bin.dat');
if (!plugins.file.writeFile(f, bytes))
	application.output('Failed to write the file.');
// mimeType variable can be left null, and is used for webclient only. Specify one of any valid mime types as referenced here: http://www.w3schools.com/media/media_mimeref.asp'
var mimeType = 'application/vnd.ms-excel'
if (!plugins.file.writeFile(f, bytes, mimeType))
	application.output('Failed to write the file.');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idwriteFile-String_byteArray_String
Table Row (tr)
idname
Table Cell (td)
writeFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
writeFile
Span
(file, data, mimeType)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Writes data into a binary file. (Web Enabled: file parameter can be a string 'mypdffile.pdf' to hint the browser what it is, if it is a JSFile instance it will be saved on the server)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} file

...

- the file path as a String
{byte[]} data

...

- the data to be written
{String} mimeType

...

- the mime type
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

/**@type {Array<byte>}*/
var bytes = new Array();
for (var i=0; i<1024; i++)
	bytes[i] = i % 100;
var f = plugins.file.convertToJSFile('bin.dat');
if (!plugins.file.writeFile(f, bytes))
	application.output('Failed to write the file.');
// mimeType variable can be left null, and is used for webclient only. Specify one of any valid mime types as referenced here: http://www.w3schools.com/media/media_mimeref.asp'
var mimeType = 'application/vnd.ms-excel'
if (!plugins.file.writeFile(f, bytes, mimeType))
	application.output('Failed to write the file.');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idwriteTXTFile-JSFile_String
Table Row (tr)
idname
Table Cell (td)
writeTXTFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
writeTXTFile
Span
(file, text_data)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Writes data into a text file. (Web Enabled: file parameter can be a string 'mytextfile.txt' to hint the browser what it is, if it is a JSFile instance it will be saved on the server)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} file

...

- JSFile
{String} text_data

...

- Text to be written.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean

...

- Success boolean.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var fileNameSuggestion = 'myspecialexport.tab'
var textData = 'load of data...'
var success = plugins.file.writeTXTFile(fileNameSuggestion, textData);
if (!success) application.output('Could not write file.');
// For file-encoding parameter options (default OS encoding is used), http://download.oracle.com/javase/1.4.2/docs/guide/intl/encoding.doc.html
// mimeType variable can be left null, and is used for webclient only. Specify one of any valid mime types as referenced here: http://www.w3schools.com/media/media_mimeref.asp'

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idwriteTXTFile-JSFile_String_String
Table Row (tr)
idname
Table Cell (td)
writeTXTFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
writeTXTFile
Span
(file, text_data, charsetname)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Writes data into a text file. (Web Enabled: file parameter can be a string 'mytextfile.txt' to hint the browser what it is, if it is a JSFile instance it will be saved on the server)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} file

...

- JSFile
{String} text_data

...

- Text to be written.
{String} charsetname

...

- Charset name.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean

...

- Success boolean.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var fileNameSuggestion = 'myspecialexport.tab'
var textData = 'load of data...'
var success = plugins.file.writeTXTFile(fileNameSuggestion, textData);
if (!success) application.output('Could not write file.');
// For file-encoding parameter options (default OS encoding is used), http://download.oracle.com/javase/1.4.2/docs/guide/intl/encoding.doc.html
// mimeType variable can be left null, and is used for webclient only. Specify one of any valid mime types as referenced here: http://www.w3schools.com/media/media_mimeref.asp'

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idwriteTXTFile-JSFile_String_String_String
Table Row (tr)
idname
Table Cell (td)
writeTXTFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
writeTXTFile
Span
(file, text_data, charsetname, mimeType)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Writes data into a text file. (Web Enabled: file parameter can be a string 'mytextfile.txt' to hint the browser what it is, if it is a JSFile instance it will be saved on the server)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} file

...

- JSFile
{String} text_data

...

- Text to be written.
{String} charsetname

...

- Charset name.
{String} mimeType

...

- Content type (used only on web).
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean

...

- Success boolean.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var fileNameSuggestion = 'myspecialexport.tab'
var textData = 'load of data...'
var success = plugins.file.writeTXTFile(fileNameSuggestion, textData);
if (!success) application.output('Could not write file.');
// For file-encoding parameter options (default OS encoding is used), http://download.oracle.com/javase/1.4.2/docs/guide/intl/encoding.doc.html
// mimeType variable can be left null, and is used for webclient only. Specify one of any valid mime types as referenced here: http://www.w3schools.com/media/media_mimeref.asp'

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idwriteTXTFile-String_String
Table Row (tr)
idname
Table Cell (td)
writeTXTFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
writeTXTFile
Span
(file, text_data)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Writes data into a text file. (Web Enabled: file parameter can be a string 'mytextfile.txt' to hint the browser what it is, if it is a JSFile instance it will be saved on the server)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} file

...

- The file path.
{String} text_data

...

- Text to be written.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var fileNameSuggestion = 'myspecialexport.tab'
var textData = 'load of data...'
var success = plugins.file.writeTXTFile(fileNameSuggestion, textData);
if (!success) application.output('Could not write file.');
// For file-encoding parameter options (default OS encoding is used), http://download.oracle.com/javase/1.4.2/docs/guide/intl/encoding.doc.html
// mimeType variable can be left null, and is used for webclient only. Specify one of any valid mime types as referenced here: http://www.w3schools.com/media/media_mimeref.asp'

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idwriteTXTFile-String_String_String
Table Row (tr)
idname
Table Cell (td)
writeTXTFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
writeTXTFile
Span
(file, text_data, charsetname)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Writes data into a text file. (Web Enabled: file parameter can be a string 'mytextfile.txt' to hint the browser what it is, if it is a JSFile instance it will be saved on the server)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} file

...

- The file path.
{String} text_data

...

- Text to be written.
{String} charsetname

...

- Charset name.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var fileNameSuggestion = 'myspecialexport.tab'
var textData = 'load of data...'
var success = plugins.file.writeTXTFile(fileNameSuggestion, textData);
if (!success) application.output('Could not write file.');
// For file-encoding parameter options (default OS encoding is used), http://download.oracle.com/javase/1.4.2/docs/guide/intl/encoding.doc.html
// mimeType variable can be left null, and is used for webclient only. Specify one of any valid mime types as referenced here: http://www.w3schools.com/media/media_mimeref.asp'

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idwriteTXTFile-String_String_String_String
Table Row (tr)
idname
Table Cell (td)
writeTXTFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
writeTXTFile
Span
(file, text_data, charsetname, mimeType)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Writes data into a text file. (Web Enabled: file parameter can be a string 'mytextfile.txt' to hint the browser what it is, if it is a JSFile instance it will be saved on the server)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} file

...

- The file path.
{String} text_data

...

- Text to be written.
{String} charsetname

...

- Charset name.
{String} mimeType

...

- Content type (used only on web).
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var fileNameSuggestion = 'myspecialexport.tab'
var textData = 'load of data...'
var success = plugins.file.writeTXTFile(fileNameSuggestion, textData);
if (!success) application.output('Could not write file.');
// For file-encoding parameter options (default OS encoding is used), http://download.oracle.com/javase/1.4.2/docs/guide/intl/encoding.doc.html
// mimeType variable can be left null, and is used for webclient only. Specify one of any valid mime types as referenced here: http://www.w3schools.com/media/media_mimeref.asp'

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idwriteXMLFile-JSFile_String
Table Row (tr)
idname
Table Cell (td)
writeXMLFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
writeXMLFile
Span
(file, xml_data)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Writes data into an XML file. The file is saved with the encoding specified by the XML itself. (Web Enabled: file parameter can be a string 'myxmlfile.xml' to hint the browser what it is, if it is a JSFile instance it will be saved on the server)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} file

...

- a local JSFile
{String} xml_data

...

- the xml data to write
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var fileName = 'form.xml'
var xml = controller.printXML()
var success = plugins.file.writeXMLFile(fileName, xml);
if (!success) application.output('Could not write file.');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idwriteXMLFile-JSFile_String_String
Table Row (tr)
idname
Table Cell (td)
writeXMLFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
writeXMLFile
Span
(file, xml_data, encoding)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Writes data into an XML file. The file is saved with the encoding specified by the XML itself. (Web Enabled: file parameter can be a string 'myxmlfile.xml' to hint the browser what it is, if it is a JSFile instance it will be saved on the server)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{JSFile} file

...

- a local JSFile
{String} xml_data

...

- the xml data to write
{String} encoding

...

- the specified encoding
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var fileName = 'form.xml'
var xml = controller.printXML()
var success = plugins.file.writeXMLFile(fileName, xml);
if (!success) application.output('Could not write file.');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idwriteXMLFile-String_String
Table Row (tr)
idname
Table Cell (td)
writeXMLFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
writeXMLFile
Span
(file, xml_data)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Writes data into an XML file. The file is saved with the encoding specified by the XML itself. (Web Enabled: file parameter can be a string 'myxmlfile.xml' to hint the browser what it is, if it is a JSFile instance it will be saved on the server)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} file

...

- the file path as a String
{String} xml_data

...

- the xml data to write
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var fileName = 'form.xml'
var xml = controller.printXML()
var success = plugins.file.writeXMLFile(fileName, xml);
if (!success) application.output('Could not write file.');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idwriteXMLFile-String_String_String
Table Row (tr)
idname
Table Cell (td)
writeXMLFile
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
writeXMLFile
Span
(file, xml_data, encoding)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Writes data into an XML file. The file is saved with the encoding specified by the XML itself. (Web Enabled: file parameter can be a string 'myxmlfile.xml' to hint the browser what it is, if it is a JSFile instance it will be saved on the server)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} file

...

- the file path as a String
{String} xml_data

...

- the xml data to write
{String} encoding

...

- the specified encoding
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var fileName = 'form.xml'
var xml = controller.printXML()
var success = plugins.file.writeXMLFile(fileName, xml);
if (!success) application.output('Could not write file.');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)