Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Rev: 1377850930704
Wiki Markup
{div:style=display:none}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.\\		\\		Enter additional information related to this 'class' inside the \{div} macro with 'id=description'{div}
{div:id=description}The File plugin provides functionality to work with files.

Main features are:
- Creating temporary files
- Reading from and writing to the filesystem
- Retrieving information on files and directories on the file system 
- Streaming files between the Smart Client and the Server (and vise versa)\\
The stream methods are not directly useful for the WebClient, because this is really streaming of files between a client and a server, and the client code of the WebClient is already running on the server, so you are the streaming data withing the same process. The streaming for the webclientis handled by the browser code.

When using the File plugin, it's important to take into account the differences and compatibility between different clients:
- Interacting with the file system through the plugin in a Smart Client happens client-side, so on the machine where the Smart Client is launched. On all other clients (Web, Headless & Batchprocessor), the operations are performed on the Server.
- All showXxxxDialog(...) functions interact with the user through a UI. These function can only be used in Clients that provide a UI, like the Smart and Web Client.
- The showXxxxDialog(...) functions, when used in the Web Client, have certain limitations due to being operated in a browser. Browser security (currently) limits interaction with the local file system, except for single file select operations initiated by the user clicking a button.

Many functions work only in the smart client or only on the server in the Headless or WebClient, some work in the WebClient's browser and that is mentioned in the doc (WebClient enabled) most of the time an extra parameter or some certain state must be set like a callback function, because in the WebClient the function will not wait for a result and then return the result, but will go on, and then the callback is called when it is done. (like showFileOpenDialog)
You have no control directly of the real files in a a WebClient, so the files on the pc of the browser. You can't directly target them to load into the client, or with saving you can't specify the target directory where it is getting saved. This is all fully controlled by the browser.
When using the streaming features of the File plugin, make sure that you set the directory "servoy.FileServerService.defaultFolder" of the File server plugin settings in the admin page. Don't reply on the default behavior, specify your own writable directory.

Because the File plugin works with 3 different kind of files (LocalFiles on disk, RemoteFiles on the server when streaming is used and Uploaded files from the webclient when the browser uploads a file), not all things that you call on a JSFile object will give you data that you expect, for example a Uploaded file that you get back in the callback method of a showFileOpenDialog in the webclient does not represent an actual File object on the server. It is a binary data object (blob) that is only in memory, so getParentFile() or getPath() will return null in these cases, you don't get access or a reference to the file path or directory of the browsers pc. Also setBytes() will result in an exception. Best things to use is the getBytes() method if you want to get the bytes and store that, that will work for all 3 types. If you want to store the bytes that a webclient uploaded in another file the quickest way to do that is to use:

var fileOnServer = plugins.file.convertToJSFile('/path/to/file/on/server');

plugins.file.writeFile(fileOnServer,uploadedFile.getBytes());{div}\\ 

{table:id=|class=servoy sReturnTypes}{tr:style=height: 30px;}{th}Return Types{th}{tr}{tr}{td}{span:class=sWordList}[JSFile]{span}{span:class=sWordList}[JSProgressMonitor]{span}{td}{tr}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Server Property Summary{th}{tr}{tbody}{tr}{td}{td}{td}[#servoy.FileServerService.defaultFolder]{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#appendToTXTFile]\(file, text)
Appends a string given in parameter to a file, using default platform encoding.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#appendToTXTFile]\(file, text, encoding)
Appends a string given in parameter to a file, using the specified encoding.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#appendToTXTFile]\(file, text)
Appends a string given in parameter to a file, using default platform encoding.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#appendToTXTFile]\(file, text, encoding){td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#convertToJSFile]\(file)
Returns a JSFile instance corresponding to an alternative representation of a file (for example a string).{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#convertToRemoteJSFile]\(path)
Convenience return to get a JSFile representation of a server file based on its path.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#copyFile]\(source, destination)
Copies the source file to the destination file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#copyFolder]\(source, destination)
Copies the sourcefolder to the destination folder, recursively.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#createFile]\(targetFile)
Creates a JSFile instance.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#createFolder]\(destination)
Creates a folder on disk.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#createTempFile]\(prefix, suffix)
Creates a temporary file on disk.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#deleteFile]\(destination)
Removes a file from disk.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#deleteFolder]\(destination, showWarning)
Deletes a folder from disk recursively.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getDefaultUploadLocation]\()
Returns the default upload location path of the server.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#getDesktopFolder]\()
Returns a JSFile instance that corresponds to the Desktop folder of the currently logged in user.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getDiskList]\()
Returns an Array of JSFile instances correponding to the file system root folders.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getFileSize]\(path)
Returns the size of the specified file.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getFolderContents]\(targetFolder)
Returns an array of JSFile instances corresponding to content of the specified folder.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getFolderContents]\(targetFolder, fileFilter)
Returns an array of JSFile instances corresponding to content of the specified folder.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getFolderContents]\(targetFolder, fileFilter, fileOption)
Returns an array of JSFile instances corresponding to content of the specified folder.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getFolderContents]\(targetFolder, fileFilter, fileOption, visibleOption)
Returns an array of JSFile instances corresponding to content of the specified folder.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getFolderContents]\(targetFolder, fileFilter, fileOption, visibleOption, lockedOption)
Returns an array of JSFile instances corresponding to content of the specified folder.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getFolderContents]\(targetFolder)
Returns an array of JSFile instances corresponding to content of the specified folder.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getFolderContents]\(targetFolder, fileFilter)
Returns an array of JSFile instances corresponding to content of the specified folder.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getFolderContents]\(targetFolder, fileFilter, fileOption)
Returns an array of JSFile instances corresponding to content of the specified folder.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getFolderContents]\(targetFolder, fileFilter, fileOption, visibleOption)
Returns an array of JSFile instances corresponding to content of the specified folder.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getFolderContents]\(targetFolder, fileFilter, fileOption, visibleOption, lockedOption)
Returns an array of JSFile instances corresponding to content of the specified folder.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#getHomeFolder]\()
Returns a JSFile instance corresponding to the home folder of the logged in used.{td}{tr}{tbody}{tbody}{tr}{td}[Date]{td}{td}[#getModificationDate]\(path)
Returns the modification date of a file.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getRemoteFolderContents]\(targetFolder)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getRemoteFolderContents]\(targetFolder, fileFilter)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getRemoteFolderContents]\(targetFolder, fileFilter, fileOption)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getRemoteFolderContents]\(targetFolder, fileFilter, fileOption, visibleOption)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getRemoteFolderContents]\(targetFolder, fileFilter, fileOption, visibleOption, lockedOption)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getRemoteFolderContents]\(targetFolder)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getRemoteFolderContents]\(targetFolder, fileFilter)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getRemoteFolderContents]\(targetFolder, fileFilter, fileOption)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getRemoteFolderContents]\(targetFolder, fileFilter, fileOption, visibleOption)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#getRemoteFolderContents]\(targetFolder, fileFilter, fileOption, visibleOption, lockedOption)
Returns an array of JSFile instances corresponding to content of the specified folder on the server side.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#moveFile]\(source, destination)
Moves the file from the source to the destination place.{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#readFile]\()
Reads all or part of the content from a binary file.{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#readFile]\(file)
Reads all or part of the content from a binary file.{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#readFile]\(file, size)
Reads all or part of the content from a binary file.{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#readFile]\(file)
Reads all or part of the content from a binary file.{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#readFile]\(file, size)
Reads all or part of the content from a binary file.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#readTXTFile]\()
Read all content from a text file.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#readTXTFile]\(file)
Read all content from a text file.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#readTXTFile]\(file, charsetname)
Read all content from a text file.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#readTXTFile]\(file)
Read all content from a text file.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#readTXTFile]\(file, charsetname)
Read all content from a text file.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#showDirectorySelectDialog]\()
Shows a directory selector dialog.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#showDirectorySelectDialog]\(directory)
Shows a directory selector dialog.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#showDirectorySelectDialog]\(directory, title)
Shows a directory selector dialog.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#showDirectorySelectDialog]\(directory)
Shows a directory selector dialog.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#showDirectorySelectDialog]\(directory, title)
Shows a directory selector dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\()
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(selectionMode)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(selectionMode, startDirectory)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(selectionMode, startDirectory, multiselect)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(selectionMode, startDirectory, multiselect, filter)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(selectionMode, startDirectory, multiselect, filter, callbackfunction)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(selectionMode, startDirectory, multiselect, filter, callbackfunction, title)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(selectionMode, startDirectory, multiselect, callbackfunction)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(selectionMode, startDirectory, callbackfunction)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(selectionMode, startDirectory)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(selectionMode, startDirectory, multiselect)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(selectionMode, startDirectory, multiselect, filter)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(selectionMode, startDirectory, multiselect, filter, callbackfunction)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(selectionMode, startDirectory, multiselect, filter, callbackfunction, title)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(selectionMode, startDirectory, multiselect, callbackfunction)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(selectionMode, startDirectory, callbackfunction)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(selectionMode, callbackfunction)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#showFileOpenDialog]\(callbackfunction)
Shows a file open dialog.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#showFileSaveDialog]\()
Shows a file save dialog.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#showFileSaveDialog]\(fileNameDir)
Shows a file save dialog.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#showFileSaveDialog]\(fileNameDir, title)
Shows a file save dialog.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#showFileSaveDialog]\(fileNameDir)
Shows a file save dialog.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#showFileSaveDialog]\(fileNameDir, title)
Shows a file save dialog.{td}{tr}{tbody}{tbody}{tr}{td}[JSProgressMonitor]{td}{td}[#streamFilesFromServer]\(files, serverFiles)
Stream 1 or more files from the server to the client.{td}{tr}{tbody}{tbody}{tr}{td}[JSProgressMonitor]{td}{td}[#streamFilesFromServer]\(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.{td}{tr}{tbody}{tbody}{tr}{td}[JSProgressMonitor]{td}{td}[#streamFilesToServer]\(files)
Overloaded method, only defines file(s) to be streamed{td}{tr}{tbody}{tbody}{tr}{td}[JSProgressMonitor]{td}{td}[#streamFilesToServer]\(files, serverFiles)
Overloaded method, defines file(s) to be streamed and a callback function{td}{tr}{tbody}{tbody}{tr}{td}[JSProgressMonitor]{td}{td}[#streamFilesToServer]\(files, serverFiles, callback)
Overloaded method, defines file(s) to be streamed, a callback function and file name(s) to use on the server{td}{tr}{tbody}{tbody}{tr}{td}[JSProgressMonitor]{td}{td}[#streamFilesToServer]\(files, callback)
Overloaded method, defines file(s) to be streamed and a callback function{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#writeFile]\(file, data)
Writes data into a binary file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#writeFile]\(file, data, mimeType)
Writes data into a binary file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#writeFile]\(file, data){td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#writeFile]\(file, data, mimeType)
Writes data into a binary file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#writeTXTFile]\(file, text_data)
Writes data into a text file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#writeTXTFile]\(file, text_data, charsetname)
Writes data into a text file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#writeTXTFile]\(file, text_data, charsetname, mimeType)
Writes data into a text file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#writeTXTFile]\(file, text_data)
Writes data into a text file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#writeTXTFile]\(file, text_data, charsetname)
Writes data into a text file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#writeTXTFile]\(file, text_data, charsetname, mimeType)
Writes data into a text file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#writeXMLFile]\(file, xml_data)
Writes data into an XML file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#writeXMLFile]\(file, xml_data, encoding)
Writes data into an XML file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#writeXMLFile]\(file, xml_data)
Writes data into an XML file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#writeXMLFile]\(file, xml_data, encoding)
Writes data into an XML file.{td}{tr}{tbody}{table}\\ 

{table:id=serverProperty|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Server Property Details{th}{tr}{tbody:id=servoy.FileServerService.defaultFolder}{tr:id=name}{td}h6.servoy.FileServerService.defaultFolder{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=appendToTXTFile-JSFile_String}{tr:id=name}{td}h6.appendToTXTFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}appendToTXTFile{span}{span}\(file, text){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Appends a string given in parameter to a file, using default platform encoding.{div}{td}{tr}{tr:id=snc}{td}*Since*\\{div:class=sIndent}Servoy 5.2{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} file -- a local JSFile
\{[String]} text -- the text to append to the file
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- true if appending worked{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// append some text to a text file:
	var ok = plugins.file.appendToTXTFile('myTextFile.txt', '\nMy fantastic new line of text\n');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=appendToTXTFile-JSFile_String_String}{tr:id=name}{td}h6.appendToTXTFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}appendToTXTFile{span}{span}\(file, text, encoding){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Appends a string given in parameter to a file, using the specified encoding.{div}{td}{tr}{tr:id=snc}{td}*Since*\\{div:class=sIndent}Servoy 5.2{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} file -- a local JSFile
\{[String]} text -- the text to append to the file
\{[String]} encoding -- the encoding to use
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- true if appending worked{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// append some text to a text file:
	var ok = plugins.file.appendToTXTFile('myTextFile.txt', '\nMy fantastic new line of text\n');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=appendToTXTFile-String_String}{tr:id=name}{td}h6.appendToTXTFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}appendToTXTFile{span}{span}\(file, text){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Appends a string given in parameter to a file, using default platform encoding.{div}{td}{tr}{tr:id=snc}{td}*Since*\\{div:class=sIndent}Servoy 5.2{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} file -- the file path as a String
\{[String]} text -- the text to append to the file
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- true if appending worked{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// append some text to a text file:
	var ok = plugins.file.appendToTXTFile('myTextFile.txt', '\nMy fantastic new line of text\n');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=appendToTXTFile-String_String_String}{tr:id=name}{td}h6.appendToTXTFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}appendToTXTFile{span}{span}\(file, text, encoding){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} file -- the file path as a String
\{[String]} text -- the text to append to the file
\{[String]} encoding -- the encoding to use
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// append some text to a text file:
	var ok = plugins.file.appendToTXTFile('myTextFile.txt', '\nMy fantastic new line of text\n');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=convertToJSFile-Object}{tr:id=name}{td}h6.convertToJSFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]{span}{span:style=font-weight: bold;}convertToJSFile{span}{span}\(file){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns a JSFile instance corresponding to an alternative representation of a file (for example a string).{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} file
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile] -- JSFile{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var f = plugins.file.convertToJSFile("story.txt");
if (f.canRead())
	application.output("File can be read.");
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=convertToRemoteJSFile-String}{tr:id=name}{td}h6.convertToRemoteJSFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]{span}{span:style=font-weight: bold;}convertToRemoteJSFile{span}{span}\(path){span}{td}{tr}{tr:id=sncdes}{td}*Since*\\{div:class=sIndent}Servoy 5.2{div}{Convenience return to get a JSFile representation of a server file based on its path.{div}{td}{tr}{tr:id=snc}{td}*Since*\\{div:class=sIndent}Servoy 5.2{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} path -- the path representing a file on the server (should start with "/")
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile] -- the JSFile{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var f = plugins.file.convertToRemoteJSFile('/story.txt');
if (f && f.canRead())
	application.output('File can be read.');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=copyFile-Object_Object}{tr:id=name}{td}h6.copyFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}copyFile{span}{span}\(source, destination){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Copies the source file to the destination file. Returns true if the copy succeeds, false if any error occurs.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} source
\{[Object]} destination
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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.");
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=copyFolder-Object_Object}{tr:id=name}{td}h6.copyFolder{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}copyFolder{span}{span}\(source, destination){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Copies the sourcefolder to the destination folder, recursively. Returns true if the copy succeeds, false if any error occurs.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} source
\{[Object]} destination
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- success boolean{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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.");
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=createFile-Object}{tr:id=name}{td}h6.createFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]{span}{span:style=font-weight: bold;}createFile{span}{span}\(targetFile){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a JSFile instance. Does not create the file on disk.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} targetFile
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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.");
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=createFolder-Object}{tr:id=name}{td}h6.createFolder{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}createFolder{span}{span}\(destination){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a folder on disk. Returns true if the folder is successfully created, false if any error occurs.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} destination
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var d = plugins.file.convertToJSFile("newfolder");
if (!plugins.file.createFolder(d))
	application.output("Folder could not be created.");
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=createTempFile-String_String}{tr:id=name}{td}h6.createTempFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]{span}{span:style=font-weight: bold;}createTempFile{span}{span}\(prefix, suffix){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a temporary file on disk. A prefix and an extension are specified and they will be part of the file name.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} prefix
\{[String]} suffix
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var tempFile = plugins.file.createTempFile('myfile','.txt');
application.output('Temporary file created as: ' + tempFile.getAbsolutePath());
plugins.file.writeTXTFile(tempFile, 'abcdefg');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=deleteFile-Object}{tr:id=name}{td}h6.deleteFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}deleteFile{span}{span}\(destination){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Removes a file from disk. Returns true on success, false otherwise.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} destination
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (plugins.file.deleteFile('story.txt'))
	application.output('File deleted.');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=deleteFolder-Object_Boolean}{tr:id=name}{td}h6.deleteFolder{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}deleteFolder{span}{span}\(destination, showWarning){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[Object]} destination
\{[Boolean]} showWarning
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} destination
\{[Boolean]} showWarning
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (plugins.file.deleteFolder('stories', true))
	application.output('Folder deleted.');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDefaultUploadLocation}{tr:id=name}{td}h6.getDefaultUploadLocation{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getDefaultUploadLocation{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns the default upload location path of the server.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String] -- the location as canonical path{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// get the (server-side) default upload location path:
var serverPath = plugins.file.getDefaultUploadLocation();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDesktopFolder}{tr:id=name}{td}h6.getDesktopFolder{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]{span}{span:style=font-weight: bold;}getDesktopFolder{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns a JSFile instance that corresponds to the Desktop folder of the currently logged in user.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var d = plugins.file.getDesktopFolder();
application.output('desktop folder is: ' + d.getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDiskList}{tr:id=name}{td}h6.getDiskList{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getDiskList{span}{span}\(){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\{div:class=sIndent}[JSFile]Returns an Array of JSFile instances correponding to the file system root folders.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var roots = plugins.file.getDiskList();
for (var i = 0; i < roots.length; i++)
	application.output(roots[i].getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFileSize-Object}{tr:id=name}{td}h6.getFileSize{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Number]{span}{span:style=font-weight: bold;}getFileSize{span}{span}\(path){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns the size of the specified file.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} path
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var f = plugins.file.convertToJSFile('story.txt');
application.output('file size: ' + plugins.file.getFileSize(f));
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFolderContents-JSFile}{tr:id=name}{td}h6.getFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getFolderContents{span}{span}\(targetFolder){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} targetFolder -- JSFile object.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFolderContents-JSFile_Object}{tr:id=name}{td}h6.getFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getFolderContents{span}{span}\(targetFolder, fileFilter){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} targetFolder --Returns an array of JSFile object.
\{[Object]} fileFilter -- Filter or array of filters for files in folder.
{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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} targetFolder -- JSFile object.
\{[Object]} fileFilter -- Filter or array of filters for files in folder.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFolderContents-JSFile_Object_Number}{tr:id=name}{td}h6.getFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getFolderContents{span}{span}\(targetFolder, fileFilter, fileOption){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} targetFolder -- JSFile object.
\{[Object]} fileFilter -- Filter or array of filters for files in folder.
\{[Number]} fileOption -- 1=files, 2=dirs
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFolderContents-JSFile_Object_Number_Number}{tr:id=name}{td}h6.getFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getFolderContents{span}{span}\(targetFolder, fileFilter, fileOption, visibleOption){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} targetFolder --Returns an array of JSFile object.
\{[Object]} fileFilter -- Filter or array of 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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFolderContents-JSFile_Object_Number_Number_Number}{tr:id=name}{td}h6.getFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getFolderContents{span}{span}\(targetFolder, fileFilter, fileOption, visibleOption, lockedOption){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFolderContents-String}{tr:id=name}{td}h6.getFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getFolderContents{span}{span}\(targetFolder){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[String]} targetFolder -- File path.
{div}{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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} targetFolder -- File path.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFolderContents-String_Object}{tr:id=name}{td}h6.getFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getFolderContents{span}{span}\(targetFolder, fileFilter){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} targetFolder -- File path.
\{[Object]} fileFilter -- Filter or array of filters for files in folder.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFolderContents-String_Object_Number}{tr:id=name}{td}h6.getFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getFolderContents{span}{span}\(targetFolder, fileFilter, fileOption){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[String]} targetFolder -- File path.
\{[Object]} fileFilter -- Filter or array of filters for files in folder.
\{[Number]} fileOption -- 1=filesReturns 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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} targetFolder -- File path.
\{[Object]} fileFilter -- Filter or array of filters for files in folder.
\{[Number]} fileOption -- 1=files, 2=dirs
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFolderContents-String_Object_Number_Number}{tr:id=name}{td}h6.getFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getFolderContents{span}{span}\(targetFolder, fileFilter, fileOption, visibleOption){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFolderContents-String_Object_Number_Number_Number}{tr:id=name}{td}h6.getFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getFolderContents{span}{span}\(targetFolder, fileFilter, fileOption, visibleOption, lockedOption){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[String]} targetFolder -- File path.
\{[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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var files = plugins.file.getFolderContents('stories', '.txt');
for (var i=0; i<files.length; i++)
	application.output(files[i].getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getHomeFolder}{tr:id=name}{td}h6.getHomeFolder{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]{span}{span:style=font-weight: bold;}getHomeFolder{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns a JSFile instance corresponding to the home folder of the logged in used.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var d = plugins.file.getHomeFolder();
application.output('home folder: ' + d.getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getModificationDate-Object}{tr:id=name}{td}h6.getModificationDate{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Date]{span}{span:style=font-weight: bold;}getModificationDate{span}{span}\(path){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns the modification date of a file.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} path
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Date]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var f = plugins.file.convertToJSFile('story.txt');
application.output('last changed: ' + plugins.file.getModificationDate(f));
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRemoteFolderContents-JSFile}{tr:id=name}{td}h6.getRemoteFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getRemoteFolderContents{span}{span}\(targetFolder){span}{td}{tr}{tr:id=sncdes}{td}*Since*\\{div:class=sIndent}Servoy 5.2.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.{div}{td}{tr}{tr:id=snc}{td}*Since*\\{div:class=sIndent}Servoy 5.2.1{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} targetFolder
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[] -- the array of file names{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRemoteFolderContents-JSFile_Object}{tr:id=name}{td}h6.getRemoteFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getRemoteFolderContents{span}{span}\(targetFolder, fileFilter){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} targetFolder -- Folder as JSFile object.
\{[Object]} fileFilter -- Filter or array of filters for files in folder.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[] -- the array of file names{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRemoteFolderContents-JSFile_Object_Number}{tr:id=name}{td}h6.getRemoteFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getRemoteFolderContents{span}{span}\(targetFolder, fileFilter, fileOption){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} targetFolder -- Folder as JSFile object.
\{[Object]} fileFilter -- Filter or array of filters for files in folder.
\{[Number]} fileOption -- 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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} targetFolder -- Folder as JSFile object.
\{[Object]} fileFilter -- Filter or array of filters for files in folder.
\{[Number]} fileOption -- 1=files, 2=dirs
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[] -- the array of file names{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRemoteFolderContents-JSFile_Object_Number_Number}{tr:id=name}{td}h6.getRemoteFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getRemoteFolderContents{span}{span}\(targetFolder, fileFilter, fileOption, visibleOption){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[] -- the array of file names{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRemoteFolderContents-JSFile_Object_Number_Number_Number}{tr:id=name}{td}h6.getRemoteFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getRemoteFolderContents{span}{span}\(targetFolder, fileFilter, fileOption, visibleOption, lockedOption){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} targetFolder 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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[] -- the array of file names{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRemoteFolderContents-String}{tr:id=name}{td}h6.getRemoteFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getRemoteFolderContents{span}{span}\(targetFolder){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} targetFolder -- Folder path.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[] -- the array of file names{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRemoteFolderContents-String_Object}{tr:id=name}{td}h6.getRemoteFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getRemoteFolderContents{span}{span}\(targetFolder, fileFilter){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[String]} targetFolder -- Folder path.
\{[Object]} fileFilter 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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} targetFolder -- Folder path.
\{[Object]} fileFilter -- Filter or array of filters for files in folder.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[] -- the array of file names{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRemoteFolderContents-String_Object_Number}{tr:id=name}{td}h6.getRemoteFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getRemoteFolderContents{span}{span}\(targetFolder, fileFilter, fileOption){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} targetFolder -- Folder path.
\{[Object]} fileFilter -- Filter or array of filters for files in folder.
\{[Number]} fileOption -- 1=files, 2=dirs
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[] -- the array of file names{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRemoteFolderContents-String_Object_Number_Number}{tr:id=name}{td}h6.getRemoteFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getRemoteFolderContents{span}{span}\(targetFolder, fileFilter, fileOption, visibleOption){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[String]} targetFolder -- Folder path.
\{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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[] -- the array of file names{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRemoteFolderContents-String_Object_Number_Number_Number}{tr:id=name}{td}h6.getRemoteFolderContents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]\[]{span}{span:style=font-weight: bold;}getRemoteFolderContents{span}{span}\(targetFolder, fileFilter, fileOption, visibleOption, lockedOption){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]\[] -- the array of file names{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// retrieves an array of files located on the server side inside the default upload folder:
var files = plugins.file.getRemoteFolderContents('/', '.txt');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=moveFile-Object_Object}{tr:id=name}{td}h6.moveFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}moveFile{span}{span}\(source, destination){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[Object]} source
\{[Object]} destination
Moves the file from the source to the destination place. Returns true on success, false otherwise.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} source
\{[Object]} destination
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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.');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=readFile}{tr:id=name}{td}h6.readFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}readFile{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}byte[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=readFile-JSFile}{tr:id=name}{td}h6.readFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}readFile{span}{span}\(file){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} file -- JSFile.
{divReads 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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} file -- JSFile.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}byte[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=readFile-JSFile_Number}{tr:id=name}{td}h6.readFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}readFile{span}{span}\(file, size){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} file -- JSFile.
\{[Number]} size -- Number of bytes to read.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}byte[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=readFile-String}{tr:id=name}{td}h6.readFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}readFile{span}{span}\(file){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[String]} file -- the file path.
{div}{td}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} file -- the file path.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}byte[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=readFile-String_Number}{tr:id=name}{td}h6.readFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}readFile{span}{span}\(file, size){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} file -- the file path.
\{[Number]} size -- Number of bytes to read.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}byte[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=readTXTFile}{tr:id=name}{td}h6.readTXTFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}readTXTFile{span}{span}\(){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// ReadRead all content from a known text file. varIf txt =a plugins.file.readTXTFile('story.txt');
application. 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){div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=readTXTFile-JSFile}{tr:id=name}{td}h6.readTXTFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}readTXTFile{span}{span}\(file){span: bold;}readTXTFile{span}{span}\(file){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} file -- JSFile.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=readTXTFile-JSFile_String}{tr:id=name}{td}h6.readTXTFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}readTXTFile{span}{span}\(file, charsetname){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} file -- JSFile.
\{[String]} charsetname -- Charset name.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=readTXTFile-String}{tr:id=name}{td}h6.readTXTFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}readTXTFile{span}{span}\(file){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} file -- the file path.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=readTXTFile-String_String}{tr:id=name}{td}h6.readTXTFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}readTXTFile{span}{span}\(file, charsetname){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} file -- the file path.
\{[String]} charsetname -- Charset name.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showDirectorySelectDialog}{tr:id=name}{td}h6.showDirectorySelectDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]{span}{span:style=font-weight: bold;}showDirectorySelectDialog{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Shows a directory selector dialog.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var dir = plugins.file.showDirectorySelectDialog();
application.output("you've selected folder: " + dir.getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showDirectorySelectDialog-JSFile}{tr:id=name}{td}h6.showDirectorySelectDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]{span}{span:style=font-weight: bold;}showDirectorySelectDialog{span}{span}\(directory){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Shows a directory selector dialog.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} directory -- Default directory as JSFile.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var dir = plugins.file.showDirectorySelectDialog();
application.output("you've selected folder: " + dir.getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showDirectorySelectDialog-JSFile_String}{tr:id=name}{td}h6.showDirectorySelectDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]{span}{span:style=font-weight: bold;}showDirectorySelectDialog{span}{span}\(directory, title){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Shows a directory selector dialog.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} directory -- Default directory as JSFile.
\{[String]} title -- Dialog title.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var dir = plugins.file.showDirectorySelectDialog();
application.output("you've selected folder: " + dir.getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showDirectorySelectDialog-String}{tr:id=name}{td}h6.showDirectorySelectDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]{span}{span:style=font-weight: bold;}showDirectorySelectDialog{span}{span}\(directory){span;}showDirectorySelectDialog{span}{span}\(directory){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Shows a directory selector dialog.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} directory -- Default directory as file path.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var dir = plugins.file.showDirectorySelectDialog();
application.output("you've selected folder: " + dir.getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showDirectorySelectDialog-String_String}{tr:id=name}{td}h6.showDirectorySelectDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]{span}{span:style=font-weight: bold;}showDirectorySelectDialog{span}{span}\(directory, title){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Shows a directory selector dialog.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} directory -- Default directory as file path.
\{[String]} title -- Dialog title.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var dir = plugins.file.showDirectorySelectDialog();
application.output("you've selected folder: " + dir.getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Number}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode){span=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Number]} selectionMode -- 0=both,1=Files,2=Dirs
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Number_JSFile}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, startDirectory){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Number]} selectionMode -- 0=both,1=Files,2=Dirs
\{[JSFile]} startDirectory -- JSFile instance of default folder; null=default/previous
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Number_JSFile_Boolean}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, startDirectory, multiselect){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Number]} selectionMode -- 0=both,1=Files,2=Dirs
\{[JSFile]} startDirectory -- JSFile instance of default folder, null=default/previous
\{[Boolean]} multiselect -- true/false
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Number_JSFile_Boolean_Object}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, startDirectory, multiselect, filter){span}showFileOpenDialog{span}{span}\(selectionMode, startDirectory, multiselect, filter){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Number_JSFile_Boolean_Object_Function}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, startDirectory, multiselect, filter, callbackfunction){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Number_JSFile_Boolean_Object_Function_String}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, startDirectory, multiselect, filter, callbackfunction, title){spanspan}\(selectionMode, startDirectory, multiselect, filter, callbackfunction, title){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Number_JSFile_Boolean_Function}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, startDirectory, multiselect, callbackfunction){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Number_JSFile_Function}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, startDirectory, callbackfunction){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Number_String}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, startDirectory){span-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, startDirectory){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Number]} selectionMode -- 0=both,1=Files,2=Dirs
\{[String]} startDirectory -- Path to default folder; null=default/previous
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Number_String_Boolean}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, startDirectory, multiselect){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Number]} selectionMode -- 0=both,1=Files,2=Dirs
\{[String]} startDirectory -- Path to default folder, null=default/previous
\{[Boolean]} multiselect -- true/false
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Number_String_Boolean_Object}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, startDirectory, multiselect, filter){span}\(selectionMode, startDirectory, multiselect, filter){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Number_String_Boolean_Object_Function}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, startDirectory, multiselect, filter, callbackfunction){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Number_String_Boolean_Object_Function_String}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, startDirectory, multiselect, filter, callbackfunction, title){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Number_String_Boolean_Function}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, startDirectory, multiselect, callbackfunction){span;}showFileOpenDialog{span}{span}\(selectionMode, startDirectory, multiselect, callbackfunction){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Number_String_Function}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, startDirectory, callbackfunction){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Number_Function}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, callbackfunction){span=font-weight: bold;}showFileOpenDialog{span}{span}\(selectionMode, callbackfunction){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Number]} selectionMode -- 0=both,1=Files,2=Dirs
\{[Function]} callbackfunction -- A function that takes the (JSFile) array of the selected files as first argument
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileOpenDialog-Function}{tr:id=name}{td}h6.showFileOpenDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}showFileOpenDialog{span}{span}\(callbackfunction){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Function]} callbackfunction -- A function that takes the (JSFile) array of the selected files as first argument
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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,mycallbackfunction,'Select some nice files')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileSaveDialog}{tr:id=name}{td}h6.showFileSaveDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]{span}{span:style=font-weight: bold;}showFileSaveDialog{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Shows a file save dialog.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var file = plugins.file.showFileSaveDialog();
application.output("you've selected file: " + file.getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileSaveDialog-JSFile}{tr:id=name}{td}h6.showFileSaveDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]{span}{span:style=font-weight: bold;}showFileSaveDialog{span}{span}\(fileNameDir){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Shows a file save dialog.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} fileNameDir -- JSFile to save.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var file = plugins.file.showFileSaveDialog();
application.output("you've selected file: " + file.getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileSaveDialog-JSFile_String}{tr:id=name}{td}h6.showFileSaveDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]{span}{span:style=font-weight: bold;}showFileSaveDialog{span}{span}\(fileNameDir, title){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Shows a file save dialog.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} fileNameDir -- JSFile to save
\{[String]} title -- Dialog title.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var file = plugins.file.showFileSaveDialog();
application.output("you've selected file: " + file.getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileSaveDialog-String}{tr:id=name}{td}h6.showFileSaveDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]{span}{span:style=font-weight: bold;}showFileSaveDialog{span}{span}\(fileNameDir){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Shows a file save dialog.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} fileNameDir -- File (give as file path) to save.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var file = plugins.file.showFileSaveDialog();
application.output("you've selected file: " + file.getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showFileSaveDialog-String_String}{tr:id=name}{td}h6.showFileSaveDialog{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFile]{span}{span:style=font-weight: bold;}showFileSaveDialog{span}{span}\(fileNameDir, title){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Shows a file save dialog.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} fileNameDir -- File to save (specified as file path)
\{[String]} title -- Dialog title.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFile]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var file = plugins.file.showFileSaveDialog();
application.output("you've selected file: " + file.getAbsolutePath());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=streamFilesFromServer-Object_Object}{tr:id=name}{td}h6.streamFilesFromServer{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSProgressMonitor]{span}{span:style=font-weight: bold;}streamFilesFromServer{span}{span}\(files, serverFiles){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Stream 1 or more files from the server to the client.{div}{td}{tr}{tr:id=snc}{td}*Since*\\{div:class=sIndent}Servoy 5.2{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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\[\]
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSProgressMonitor] -- a JSProgressMonitor object to allow client to subscribe to progress notifications{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=streamFilesFromServer-Object_Object_Function}{tr:id=name}{td}h6.streamFilesFromServer{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSProgressMonitor]{span}{span:style=font-weight: bold;}streamFilesFromServer{span}{span}\(files, serverFiles, callback){spanstyle=font-weight: bold;}streamFilesFromServer{span}{span}\(files, serverFiles, callback){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=snc}{td}*Since*\\{div:class=sIndent}Servoy 5.2{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSProgressMonitor] -- a JSProgressMonitor object to allow client to subscribe to progress notifications{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=streamFilesToServer-Object}{tr:id=name}{td}h6.streamFilesToServer{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSProgressMonitor]{span}{span:style=font-weight: bold;}streamFilesToServer{span}{span}\(files){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Overloaded method, only defines file(s) to be streamed{div}{td}{tr}{tr:id=snc}{td}*Since*\\{div:class=sIndent}Servoy 5.2{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} files -- file(s) to be streamed (can be a String path or a JSFile) or an Array of these
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSProgressMonitor] -- a JSProgressMonitor object to allow client to subscribe to progress notifications{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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 );
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=streamFilesToServer-Object_Object}{tr:id=name}{td}h6.streamFilesToServer{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSProgressMonitor]{span}{span:style=font-weight: bold;}streamFilesToServer{span}{span}\(files, serverFiles){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Overloaded method, defines file(s) to be streamed and a callback function{div}{td}{tr}{tr:id=snc}{td}*Since*\\{div:class=sIndent}Servoy 5.2{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSProgressMonitor] -- a JSProgressMonitor object to allow client to subscribe to progress notifications{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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 );
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=streamFilesToServer-Object_Object_Function}{tr:id=name}{td}h6.streamFilesToServer{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSProgressMonitor]{span}{span:style=font-weight: bold;}streamFilesToServer{span}{span}\(files, serverFiles, callback){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Overloaded method, defines file(s) to be streamed, a callback function and file name(s) to use on the server{div}{td}{tr}{tr:id=snc}{td}*Since*\\{div:class=sIndent}Servoy 5.2{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSProgressMonitor] -- a JSProgressMonitor object to allow client to subscribe to progress notifications{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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 );
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=streamFilesToServer-Object_Function}{tr:id=name}{td}h6.streamFilesToServer{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSProgressMonitor]{span}{span:style=font-weight: bold;}streamFilesToServer{span}{span}\(files, callback){span}\(files, callback){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Overloaded method, defines file(s) to be streamed and a callback function{div}{td}{tr}{tr:id=snc}{td}*Since*\\{div:class=sIndent}Servoy 5.2{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSProgressMonitor] -- a JSProgressMonitor object to allow client to subscribe to progress notifications{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// 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 );
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=writeFile-JSFile_byteArray}{tr:id=name}{td}h6.writeFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}writeFile{span}{span}\(file, data){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} file -- a local JSFile
\{byte[]} data -- the data to be written
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
/**@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.');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=writeFile-JSFile_byteArray_String}{tr:id=name}{td}h6.writeFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}writeFile{span}{span}\(file, data, mimeType){span: bold;}writeFile{span}{span}\(file, data, mimeType){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} file -- a local JSFile
\{byte[]} data -- the data to be written
\{[String]} mimeType -- the mime type
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
/**@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.');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=writeFile-String_byteArray}{tr:id=name}{td}h6.writeFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}writeFile{span}{span}\(file, data){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} file -- the file path as a String
\{byte[]} data -- the data to be written
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
/**@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.');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=writeFile-String_byteArray_String}{tr:id=name}{td}h6.writeFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}writeFile{span}{span}\(file, data, mimeType){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} file -- the file path as a String
\{byte[]} data -- the data to be written
\{[String]} mimeType -- the mime type
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
/**@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.');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=writeTXTFile-JSFile_String}{tr:id=name}{td}h6.writeTXTFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}writeTXTFile{span}{span}\(file, text_data){spanfont-weight: bold;}writeTXTFile{span}{span}\(file, text_data){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} file -- JSFile
\{[String]} text_data -- Text to be written.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- Success boolean.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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'
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=writeTXTFile-JSFile_String_String}{tr:id=name}{td}h6.writeTXTFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}writeTXTFile{span}{span}\(file, text_data, charsetname){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} file -- JSFile
\{[String]} text_data -- Text to be written.
\{[String]} charsetname -- Charset name.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- Success boolean.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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'
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=writeTXTFile-JSFile_String_String_String}{tr:id=name}{td}h6.writeTXTFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}writeTXTFile{span}{span}\(file, text_data, charsetname, mimeType){span, charsetname, mimeType){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} file -- JSFile
\{[String]} text_data -- Text to be written.
\{[String]} charsetname -- Charset name.
\{[String]} mimeType -- Content type (used only on web).
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- Success boolean.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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'
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=writeTXTFile-String_String}{tr:id=name}{td}h6.writeTXTFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}writeTXTFile{span}{span}\(file, text_data){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} file -- The file path.
\{[String]} text_data -- Text to be written.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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'
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=writeTXTFile-String_String_String}{tr:id=name}{td}h6.writeTXTFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}writeTXTFile{span}{span}\(file, text_data, charsetname){span: 5px;}[Boolean]{span}{span:style=font-weight: bold;}writeTXTFile{span}{span}\(file, text_data, charsetname){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} file -- The file path.
\{[String]} text_data -- Text to be written.
\{[String]} charsetname -- Charset name.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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'
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=writeTXTFile-String_String_String_String}{tr:id=name}{td}h6.writeTXTFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}writeTXTFile{span}{span}\(file, text_data, charsetname, mimeType){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} file -- The file path.
\{[String]} text_data -- Text to be written.
\{[String]} charsetname -- Charset name.
\{[String]} mimeType -- Content type (used only on web).
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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'
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=writeXMLFile-JSFile_String}{tr:id=name}{td}h6.writeXMLFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}writeXMLFile{span}{span}\(file, xml_data){span=font-weight: bold;}writeXMLFile{span}{span}\(file, xml_data){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} file -- a local JSFile
\{[String]} xml_data -- the xml data to write
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var fileName = 'form.xml'
var xml = controller.printXML()
var success = plugins.file.writeXMLFile(fileName, xml);
if (!success) application.output('Could not write file.');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=writeXMLFile-JSFile_String_String}{tr:id=name}{td}h6.writeXMLFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}writeXMLFile{span}{span}\(file, xml_data, encoding){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFile]} file -- a local JSFile
\{[String]} xml_data -- the xml data to write
\{[String]} encoding -- the specified encoding
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var fileName = 'form.xml'
var xml = controller.printXML()
var success = plugins.file.writeXMLFile(fileName, xml);
if (!success) application.output('Could not write file.');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=writeXMLFile-String_String}{tr:id=name}{td}h6.writeXMLFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}writeXMLFile{span}{span}\(file, xml_data){span;}writeXMLFile{span}{span}\(file, xml_data){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} file -- the file path as a String
\{[String]} xml_data -- the xml data to write
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var fileName = 'form.xml'
var xml = controller.printXML()
var success = plugins.file.writeXMLFile(fileName, xml);
if (!success) application.output('Could not write file.');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=writeXMLFile-String_String_String}{tr:id=name}{td}h6.writeXMLFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}writeXMLFile{span}{span}\(file, xml_data, encoding){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} file -- the file path as a String
\{[String]} xml_data -- the xml data to write
\{[String]} encoding -- the specified encoding
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var fileName = 'form.xml'
var xml = controller.printXML()
var success = plugins.file.writeXMLFile(fileName, xml);
if (!success) application.output('Could not write file.');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}