Child pages
  • JSFile

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
{hidden} DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING. THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden} {sub-section:description|text=}{sub-section}\\ {table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#canRead]\() Returns true if the file exists and is readable (has access to it).{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#canWrite]\() Returns true if the file exists and can be modified.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#createNewFile]\() Creates the file on disk if needed.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#deleteFile]\() Deletes the file from the disk if possible.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#exists]\() Returns true if the file/directory exists on the filesystem.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#getAbsoluteFile]\() Returns a JSFile instance that corresponds to the absolute form of this pathname.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getAbsolutePath]\() Returns a String representation of the absolute form of this pathname.{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#getBytes]\() {td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getContentType]\() Returns the contenttype of this file, like for example 'application/pdf'.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getName]\() Returns the name of the file.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getParent]\() Returns the String representation of the path of the parent of this file.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#getParentFile]\() Returns a JSFile instance that corresponds to the parent of this file.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getPath]\() Returns a String holding the path to the file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isAbsolute]\() Returns true if the path is absolute.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isDirectory]\()
Wiki Markup
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClient

servoy sSummary12%30%58%height: 30px;3Methods SummaryReturns true if the file exists and is readable (has access to it) - works on remote files too.Returns true if the file exists and can be modified - works on remote files too.Creates the file on disk if needed.Deletes the file from the disk if possible.Returns true if the file/directory exists on the filesystem - works on remote files too.Returns a JSFile instance that corresponds to the absolute form of this pathname - works on remote files too.Returns a String representation of the absolute form of this pathname - works on remote files too.Gets the contents (bytes) for the file data.Returns the contenttype of this file, like for example 'application/pdf' - works on remote files too.Returns the name of the file.Returns the String representation of the path of the parent of this file - works on remote files too.Returns a JSFile instance that corresponds to the parent of this file - works on remote files too.Returns a String holding the path to the file - works on remote files too.Returns true if the path is absolute.Returns true if the file is a directory - works on remote files too.Returns true if the file is a file and not a regular file - works on remote files too.Returns true if the file is hidden (a file system attribute) - works on remote files too.Returns the time/date of the last modification on the file - works on remote files too.Returns an array of strings naming the files and directories located inside the file, if the file is a directory - works on remote files too.Returns an array of JSFiles naming the files and directories located inside the file, if the file is a directory - works on remote files too.Creates a directory on disk if possible.Creates a directory on disk, together with all its parent directories, if possible.Renames the file to a different name.Set the content of the file (local or remote) to the bytes provided<br/> Will not create a new file if one doesn't existSet the content of the file (local or remote) to the bytes providedSets the date/time of the last modification on the file.Sets the readonly attribute of the file/directory.Returns the size in bytes of the file.

functionservoy sDetail2100%height:30px2Methods DetailscanReadname

canRead()

dessIndent
Returns true if the file exists and is readable (has access to it) - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowcanWritename

canWrite()

dessIndent
Returns true if the file exists and can be modified - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
createNewFilename

createNewFile()

dessIndent
Creates the file on disk if needed. Returns true if the file (name) did not already exists and had to be created - for remote, use the streamFilesToServer to stream a file.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
deleteFilename

deleteFile()

dessIndent
Deletes the file from the disk if possible. Returns true if the file could be deleted. If the file is a directory
.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isFile]\()
, then it must be empty in order to be deleted - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
existsname

exists()

dessIndent
Returns true if the file
is a file and not a regular file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isHidden]\() Returns true if the file is hidden (a file system attribute).{td}{tr}{tbody}{tbody}{tr}{td}[Date]{td}{td}[#lastModified]\() Returns the time/date of the last modification on the file.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#list]\() Returns an array of strings naming the files and directories located inside the file, if the file is a directory.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#listFiles]\() Returns an array of JSFiles naming the files and directories located inside the file, if the file is a directory.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#mkdir]\() Creates a directory on disk if possible.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#mkdirs]\() Creates a directory on disk, together with all its parent directories, if possible.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#renameTo]\(destination) Renames the file to a different name.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#setLastModified]\(date) Sets the date/time of the last modification on the file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#setReadOnly]\() Sets the readonly attribute of the file/directory.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#size]\() Returns the size in bytes of the file.{td}{tr}{tbody}{table}\\ {table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=46B6E5FC-5728-4C17-B853-585D54723EDC}{tr:id=name}{td}h6.canRead{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}canRead{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:46B6E5FC-5728-4C17-B853-585D54723EDC_des|text=|trigger=button}{sub-section}{sub-section:46B6E5FC-5728-4C17-B853-585D54723EDC_des|trigger=none|class=sIndent}
/directory exists on the filesystem - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getAbsoluteFilename

getAbsoluteFile()

dessIndent
Returns a JSFile instance that corresponds to the absolute form of this pathname - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getAbsolutePathname

getAbsolutePath()

dessIndent
Returns a String representation of the absolute form of this pathname - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getBytesname

getBytes()

dessIndent
Gets the contents (bytes) for the file data.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getContentTypename

getContentType()

dessIndent
Returns the contenttype of this file, like for example 'application/pdf' - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getNamename

getName()

dessIndent
Returns the name of the file. The name consists in the last part of the file path - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getParentname

getParent()

dessIndent
Returns the String representation of the path of the parent of this file - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getParentFilename

getParentFile()

dessIndent
Returns a JSFile instance that corresponds to the parent of this file - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getPathname

getPath()

dessIndent
Returns a String holding the path to the file - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isAbsolutename

isAbsolute()

dessIndent
Returns true if the path is absolute. The path is absolute if it starts with '/' on Unix/Linux/MacOS or has a driver letter on Windows - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isDirectoryname

isDirectory()

dessIndent
Returns true if the file is a directory - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isFilename

isFile()

dessIndent
Returns true if the file is a 
exists
file and 
is readable (has access to it).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:46B6E5FC-5728-4C17-B853-585D54723EDC_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:46B6E5FC-5728-4C17-B853-585D54723EDC_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:46B6E5FC-5728-4C17-B853-585D54723EDC_ret|text=|trigger=button}{sub-section}{sub-section:46B6E5FC-5728-4C17-B853-585D54723EDC_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:46B6E5FC-5728-4C17-B853-585D54723EDC_see|text=|trigger=button}{sub-section}{sub-section:46B6E5FC-5728-4C17-B853-585D54723EDC_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:46B6E5FC-5728-4C17-B853-585D54723EDC_see|text=|trigger=button}{sub-section}{sub-section:46B6E5FC-5728-4C17-B853-585D54723EDC_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:46B6E5FC-5728-4C17-B853-585D54723EDC_sam|text=|trigger=button}{sub-section}{sub-section:46B6E5FC-5728-4C17-B853-585D54723EDC_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('./big.jpg'); if (f.exists()) { application.output('is absolute: ' + f.isAbsolute()); application.output('is dir: ' + f.isDirectory()); application.output('is file: ' + f.isFile()); application.output('is hidden: ' + f.isHidden()); application.output('can read: ' + f.canRead()); application.output('can write: ' + f.canWrite()); application.output('last modified: ' + f.lastModified()); application.output('name: ' + f.getName()); application.output('path: ' + f.getPath()); application.output('absolute path: ' + f.getAbsolutePath()); application.output('content type: ' + f.getContentType()); application.output('size: ' + f.size()); } else { application.output('File/folder not found.'); } {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=426D8BE5-BF12-4427-97C3-E46DF7982073}{tr:id=name}{td}h6.canWrite{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}canWrite{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:426D8BE5-BF12-4427-97C3-E46DF7982073_des|text=|trigger=button}{sub-section}{sub-section:426D8BE5-BF12-4427-97C3-E46DF7982073_des|trigger=none|class=sIndent}Returns true if the file exists and can be modified.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:426D8BE5-BF12-4427-97C3-E46DF7982073_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:426D8BE5-BF12-4427-97C3-E46DF7982073_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:426D8BE5-BF12-4427-97C3-E46DF7982073_ret|text=|trigger=button}{sub-section}{sub-section:426D8BE5-BF12-4427-97C3-E46DF7982073_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:426D8BE5-BF12-4427-97C3-E46DF7982073_see|text=|trigger=button}{sub-section}{sub-section:426D8BE5-BF12-4427-97C3-E46DF7982073_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:426D8BE5-BF12-4427-97C3-E46DF7982073_see|text=|trigger=button}{sub-section}{sub-section:426D8BE5-BF12-4427-97C3-E46DF7982073_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:426D8BE5-BF12-4427-97C3-E46DF7982073_sam|text=|trigger=button}{sub-section}{sub-section:426D8BE5-BF12-4427-97C3-E46DF7982073_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('./big.jpg'); if (f.exists()) { application.output('is absolute: ' + f.isAbsolute()); application.output('is dir: ' + f.isDirectory()); application.output('is file: ' + f.isFile()); application.output('is hidden: ' + f.isHidden()); application.output('can read: ' + f.canRead()); application.output('can write: ' + f.canWrite()); application.output('last modified: ' + f.lastModified()); application.output('name: ' + f.getName()); application.output('path: ' + f.getPath()); application.output('absolute path: ' + f.getAbsolutePath()); application.output('content type: ' + f.getContentType()); application.output('size: ' + f.size()); } else { application.output('File/folder not found.'); } {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=DCA21F4F-74A5-4DDD-9D4B-A7B6866625D2}{tr:id=name}{td}h6.createNewFile{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}createNewFile{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:DCA21F4F-74A5-4DDD-9D4B-A7B6866625D2_des|text=|trigger=button}{sub-section}{sub-section:DCA21F4F-74A5-4DDD-9D4B-A7B6866625D2_des|trigger=none|class=sIndent}Creates the file on disk if needed. Returns true if the file (name) did not already exists and had to be created.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:DCA21F4F-74A5-4DDD-9D4B-A7B6866625D2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:DCA21F4F-74A5-4DDD-9D4B-A7B6866625D2_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:DCA21F4F-74A5-4DDD-9D4B-A7B6866625D2_ret|text=|trigger=button}{sub-section}{sub-section:DCA21F4F-74A5-4DDD-9D4B-A7B6866625D2_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:DCA21F4F-74A5-4DDD-9D4B-A7B6866625D2_see|text=|trigger=button}{sub-section}{sub-section:DCA21F4F-74A5-4DDD-9D4B-A7B6866625D2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:DCA21F4F-74A5-4DDD-9D4B-A7B6866625D2_see|text=|trigger=button}{sub-section}{sub-section:DCA21F4F-74A5-4DDD-9D4B-A7B6866625D2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:DCA21F4F-74A5-4DDD-9D4B-A7B6866625D2_sam|text=|trigger=button}{sub-section}{sub-section:DCA21F4F-74A5-4DDD-9D4B-A7B6866625D2_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('story.txt'); if (f.exists()) f.deleteFile(); else f.createNewFile(); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=A689D512-7FAA-4D9E-A7BE-F0D3D96E795F}{tr:id=name}{td}h6.deleteFile{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}deleteFile{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:A689D512-7FAA-4D9E-A7BE-F0D3D96E795F_des|text=|trigger=button}{sub-section}{sub-section:A689D512-7FAA-4D9E-A7BE-F0D3D96E795F_des|trigger=none|class=sIndent}Deletes the file from the disk if possible. Returns true if the file could be deleted. If the file is a directory, then it must be empty in order to be deleted.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:A689D512-7FAA-4D9E-A7BE-F0D3D96E795F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A689D512-7FAA-4D9E-A7BE-F0D3D96E795F_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A689D512-7FAA-4D9E-A7BE-F0D3D96E795F_ret|text=|trigger=button}{sub-section}{sub-section:A689D512-7FAA-4D9E-A7BE-F0D3D96E795F_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A689D512-7FAA-4D9E-A7BE-F0D3D96E795F_see|text=|trigger=button}{sub-section}{sub-section:A689D512-7FAA-4D9E-A7BE-F0D3D96E795F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A689D512-7FAA-4D9E-A7BE-F0D3D96E795F_see|text=|trigger=button}{sub-section}{sub-section:A689D512-7FAA-4D9E-A7BE-F0D3D96E795F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A689D512-7FAA-4D9E-A7BE-F0D3D96E795F_sam|text=|trigger=button}{sub-section}{sub-section:A689D512-7FAA-4D9E-A7BE-F0D3D96E795F_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('story.txt'); if (f.exists()) f.deleteFile(); else f.createNewFile(); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=4D3C48A8-9E65-4DB6-9585-F7CF3419C795}{tr:id=name}{td}h6.exists{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}exists{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:4D3C48A8-9E65-4DB6-9585-F7CF3419C795_des|text=|trigger=button}{sub-section}{sub-section:4D3C48A8-9E65-4DB6-9585-F7CF3419C795_des|trigger=none|class=sIndent}Returns true if the file/directory exists on the filesystem.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:4D3C48A8-9E65-4DB6-9585-F7CF3419C795_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4D3C48A8-9E65-4DB6-9585-F7CF3419C795_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:4D3C48A8-9E65-4DB6-9585-F7CF3419C795_ret|text=|trigger=button}{sub-section}{sub-section:4D3C48A8-9E65-4DB6-9585-F7CF3419C795_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4D3C48A8-9E65-4DB6-9585-F7CF3419C795_see|text=|trigger=button}{sub-section}{sub-section:4D3C48A8-9E65-4DB6-9585-F7CF3419C795_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4D3C48A8-9E65-4DB6-9585-F7CF3419C795_see|text=|trigger=button}{sub-section}{sub-section:4D3C48A8-9E65-4DB6-9585-F7CF3419C795_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4D3C48A8-9E65-4DB6-9585-F7CF3419C795_sam|text=|trigger=button}{sub-section}{sub-section:4D3C48A8-9E65-4DB6-9585-F7CF3419C795_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('./big.jpg'); if (f.exists()) { application.output('is absolute: ' + f.isAbsolute()); application.output('is dir: ' + f.isDirectory()); application.output('is file: ' + f.isFile()); application.output('is hidden: ' + f.isHidden()); application.output('can read: ' + f.canRead()); application.output('can write: ' + f.canWrite()); application.output('last modified: ' + f.lastModified()); application.output('name: ' + f.getName()); application.output('path: ' + f.getPath()); application.output('absolute path: ' + f.getAbsolutePath()); application.output('content type: ' + f.getContentType()); application.output('size: ' + f.size()); } else { application.output('File/folder not found.'); } {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=68DB53BC-FD4B-49B2-B2C2-279EE4AAB7B0}{tr:id=name}{td}h6.getAbsoluteFile{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSFile]{span}{span:id=iets|style=float: left; font-weight: bold;}getAbsoluteFile{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:68DB53BC-FD4B-49B2-B2C2-279EE4AAB7B0_des|text=|trigger=button}{sub-section}{sub-section:68DB53BC-FD4B-49B2-B2C2-279EE4AAB7B0_des|trigger=none|class=sIndent}Returns a JSFile instance that corresponds to the absolute form of this pathname.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:68DB53BC-FD4B-49B2-B2C2-279EE4AAB7B0_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:68DB53BC-FD4B-49B2-B2C2-279EE4AAB7B0_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:68DB53BC-FD4B-49B2-B2C2-279EE4AAB7B0_ret|text=|trigger=button}{sub-section}{sub-section:68DB53BC-FD4B-49B2-B2C2-279EE4AAB7B0_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:68DB53BC-FD4B-49B2-B2C2-279EE4AAB7B0_see|text=|trigger=button}{sub-section}{sub-section:68DB53BC-FD4B-49B2-B2C2-279EE4AAB7B0_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:68DB53BC-FD4B-49B2-B2C2-279EE4AAB7B0_see|text=|trigger=button}{sub-section}{sub-section:68DB53BC-FD4B-49B2-B2C2-279EE4AAB7B0_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:68DB53BC-FD4B-49B2-B2C2-279EE4AAB7B0_sam|text=|trigger=button}{sub-section}{sub-section:68DB53BC-FD4B-49B2-B2C2-279EE4AAB7B0_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('story.txt'); application.output('parent folder: ' + f.getAbsoluteFile().getParent()); application.output('parent folder has ' + f.getAbsoluteFile().getParentFile().listFiles().length + ' entries'); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=3E600E60-7CAB-47E6-80E8-BBD369AE7261}{tr:id=name}{td}h6.getAbsolutePath{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getAbsolutePath{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:3E600E60-7CAB-47E6-80E8-BBD369AE7261_des|text=|trigger=button}{sub-section}{sub-section:3E600E60-7CAB-47E6-80E8-BBD369AE7261_des|trigger=none|class=sIndent}Returns a String representation of the absolute form of this pathname.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:3E600E60-7CAB-47E6-80E8-BBD369AE7261_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3E600E60-7CAB-47E6-80E8-BBD369AE7261_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:3E600E60-7CAB-47E6-80E8-BBD369AE7261_ret|text=|trigger=button}{sub-section}{sub-section:3E600E60-7CAB-47E6-80E8-BBD369AE7261_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:3E600E60-7CAB-47E6-80E8-BBD369AE7261_see|text=|trigger=button}{sub-section}{sub-section:3E600E60-7CAB-47E6-80E8-BBD369AE7261_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3E600E60-7CAB-47E6-80E8-BBD369AE7261_see|text=|trigger=button}{sub-section}{sub-section:3E600E60-7CAB-47E6-80E8-BBD369AE7261_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3E600E60-7CAB-47E6-80E8-BBD369AE7261_sam|text=|trigger=button}{sub-section}{sub-section:3E600E60-7CAB-47E6-80E8-BBD369AE7261_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('./big.jpg'); if (f.exists()) { application.output('is absolute: ' + f.isAbsolute()); application.output('is dir: ' + f.isDirectory()); application.output('is file: ' + f.isFile()); application.output('is hidden: ' + f.isHidden()); application.output('can read: ' + f.canRead()); application.output('can write: ' + f.canWrite()); application.output('last modified: ' + f.lastModified()); application.output('name: ' + f.getName()); application.output('path: ' + f.getPath()); application.output('absolute path: ' + f.getAbsolutePath()); application.output('content type: ' + f.getContentType()); application.output('size: ' + f.size()); } else { application.output('File/folder not found.'); } {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=827D49F3-F744-4858-A0FF-FFD318CC44EE}{tr:id=name}{td}h6.getBytes{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}getBytes{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:827D49F3-F744-4858-A0FF-FFD318CC44EE_des|text=|trigger=button}{sub-section}{sub-section:827D49F3-F744-4858-A0FF-FFD318CC44EE_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:827D49F3-F744-4858-A0FF-FFD318CC44EE_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:827D49F3-F744-4858-A0FF-FFD318CC44EE_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:827D49F3-F744-4858-A0FF-FFD318CC44EE_ret|text=|trigger=button}{sub-section}{sub-section:827D49F3-F744-4858-A0FF-FFD318CC44EE_ret|trigger=none|class=sIndent}byte[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:827D49F3-F744-4858-A0FF-FFD318CC44EE_see|text=|trigger=button}{sub-section}{sub-section:827D49F3-F744-4858-A0FF-FFD318CC44EE_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:827D49F3-F744-4858-A0FF-FFD318CC44EE_see|text=|trigger=button}{sub-section}{sub-section:827D49F3-F744-4858-A0FF-FFD318CC44EE_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:827D49F3-F744-4858-A0FF-FFD318CC44EE_sam|text=|trigger=button}{sub-section}{sub-section:827D49F3-F744-4858-A0FF-FFD318CC44EE_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=98B6823A-96E8-497E-A509-5ACF684C2777}{tr:id=name}{td}h6.getContentType{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getContentType{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:98B6823A-96E8-497E-A509-5ACF684C2777_des|text=|trigger=button}{sub-section}{sub-section:98B6823A-96E8-497E-A509-5ACF684C2777_des|trigger=none|class=sIndent}Returns the contenttype of this file, like for example 'application/pdf'.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:98B6823A-96E8-497E-A509-5ACF684C2777_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:98B6823A-96E8-497E-A509-5ACF684C2777_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:98B6823A-96E8-497E-A509-5ACF684C2777_ret|text=|trigger=button}{sub-section}{sub-section:98B6823A-96E8-497E-A509-5ACF684C2777_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:98B6823A-96E8-497E-A509-5ACF684C2777_see|text=|trigger=button}{sub-section}{sub-section:98B6823A-96E8-497E-A509-5ACF684C2777_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:98B6823A-96E8-497E-A509-5ACF684C2777_see|text=|trigger=button}{sub-section}{sub-section:98B6823A-96E8-497E-A509-5ACF684C2777_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:98B6823A-96E8-497E-A509-5ACF684C2777_sam|text=|trigger=button}{sub-section}{sub-section:98B6823A-96E8-497E-A509-5ACF684C2777_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('./big.jpg'); if (f.exists()) { application.output('is absolute: ' + f.isAbsolute()); application.output('is dir: ' + f.isDirectory()); application.output('is file: ' + f.isFile()); application.output('is hidden: ' + f.isHidden()); application.output('can read: ' + f.canRead()); application.output('can write: ' + f.canWrite()); application.output('last modified: ' + f.lastModified()); application.output('name: ' + f.getName()); application.output('path: ' + f.getPath()); application.output('absolute path: ' + f.getAbsolutePath()); application.output('content type: ' + f.getContentType()); application.output('size: ' + f.size()); } else { application.output('File/folder not found.'); } {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=FCEA8C14-7E28-4563-ACCA-5F10A73A69AC}{tr:id=name}{td}h6.getName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:FCEA8C14-7E28-4563-ACCA-5F10A73A69AC_des|text=|trigger=button}{sub-section}{sub-section:FCEA8C14-7E28-4563-ACCA-5F10A73A69AC_des|trigger=none|class=sIndent}Returns the name of the file. The name consists in the last part of the file path.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:FCEA8C14-7E28-4563-ACCA-5F10A73A69AC_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FCEA8C14-7E28-4563-ACCA-5F10A73A69AC_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:FCEA8C14-7E28-4563-ACCA-5F10A73A69AC_ret|text=|trigger=button}{sub-section}{sub-section:FCEA8C14-7E28-4563-ACCA-5F10A73A69AC_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FCEA8C14-7E28-4563-ACCA-5F10A73A69AC_see|text=|trigger=button}{sub-section}{sub-section:FCEA8C14-7E28-4563-ACCA-5F10A73A69AC_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FCEA8C14-7E28-4563-ACCA-5F10A73A69AC_see|text=|trigger=button}{sub-section}{sub-section:FCEA8C14-7E28-4563-ACCA-5F10A73A69AC_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FCEA8C14-7E28-4563-ACCA-5F10A73A69AC_sam|text=|trigger=button}{sub-section}{sub-section:FCEA8C14-7E28-4563-ACCA-5F10A73A69AC_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('./big.jpg'); if (f.exists()) { application.output('is absolute: ' + f.isAbsolute()); application.output('is dir: ' + f.isDirectory()); application.output('is file: ' + f.isFile()); application.output('is hidden: ' + f.isHidden()); application.output('can read: ' + f.canRead()); application.output('can write: ' + f.canWrite()); application.output('last modified: ' + f.lastModified()); application.output('name: ' + f.getName()); application.output('path: ' + f.getPath()); application.output('absolute path: ' + f.getAbsolutePath()); application.output('content type: ' + f.getContentType()); application.output('size: ' + f.size()); } else { application.output('File/folder not found.'); } {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=B052BFE3-1C85-4923-A788-48B0DC71CC41}{tr:id=name}{td}h6.getParent{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getParent{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:B052BFE3-1C85-4923-A788-48B0DC71CC41_des|text=|trigger=button}{sub-section}{sub-section:B052BFE3-1C85-4923-A788-48B0DC71CC41_des|trigger=none|class=sIndent}Returns the String representation of the path of the parent of this file.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:B052BFE3-1C85-4923-A788-48B0DC71CC41_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B052BFE3-1C85-4923-A788-48B0DC71CC41_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:B052BFE3-1C85-4923-A788-48B0DC71CC41_ret|text=|trigger=button}{sub-section}{sub-section:B052BFE3-1C85-4923-A788-48B0DC71CC41_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B052BFE3-1C85-4923-A788-48B0DC71CC41_see|text=|trigger=button}{sub-section}{sub-section:B052BFE3-1C85-4923-A788-48B0DC71CC41_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B052BFE3-1C85-4923-A788-48B0DC71CC41_see|text=|trigger=button}{sub-section}{sub-section:B052BFE3-1C85-4923-A788-48B0DC71CC41_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B052BFE3-1C85-4923-A788-48B0DC71CC41_sam|text=|trigger=button}{sub-section}{sub-section:B052BFE3-1C85-4923-A788-48B0DC71CC41_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('story.txt'); application.output('parent folder: ' + f.getAbsoluteFile().getParent()); application.output('parent folder has ' + f.getAbsoluteFile().getParentFile().listFiles().length + ' entries'); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=8D83AA1F-CB1A-4605-80CE-84DC3DD2D971}{tr:id=name}{td}h6.getParentFile{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSFile]{span}{span:id=iets|style=float: left; font-weight: bold;}getParentFile{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:8D83AA1F-CB1A-4605-80CE-84DC3DD2D971_des|text=|trigger=button}{sub-section}{sub-section:8D83AA1F-CB1A-4605-80CE-84DC3DD2D971_des|trigger=none|class=sIndent}Returns a JSFile instance that corresponds to the parent of this file.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:8D83AA1F-CB1A-4605-80CE-84DC3DD2D971_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8D83AA1F-CB1A-4605-80CE-84DC3DD2D971_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:8D83AA1F-CB1A-4605-80CE-84DC3DD2D971_ret|text=|trigger=button}{sub-section}{sub-section:8D83AA1F-CB1A-4605-80CE-84DC3DD2D971_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8D83AA1F-CB1A-4605-80CE-84DC3DD2D971_see|text=|trigger=button}{sub-section}{sub-section:8D83AA1F-CB1A-4605-80CE-84DC3DD2D971_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8D83AA1F-CB1A-4605-80CE-84DC3DD2D971_see|text=|trigger=button}{sub-section}{sub-section:8D83AA1F-CB1A-4605-80CE-84DC3DD2D971_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8D83AA1F-CB1A-4605-80CE-84DC3DD2D971_sam|text=|trigger=button}{sub-section}{sub-section:8D83AA1F-CB1A-4605-80CE-84DC3DD2D971_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('story.txt'); application.output('parent folder: ' + f.getAbsoluteFile().getParent()); application.output('parent folder has ' + f.getAbsoluteFile().getParentFile().listFiles().length + ' entries'); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=3FF846EF-3F8A-44A6-AF6A-4D64F5F6F97B}{tr:id=name}{td}h6.getPath{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getPath{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:3FF846EF-3F8A-44A6-AF6A-4D64F5F6F97B_des|text=|trigger=button}{sub-section}{sub-section:3FF846EF-3F8A-44A6-AF6A-4D64F5F6F97B_des|trigger=none|class=sIndent}Returns a String holding the path to the file.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:3FF846EF-3F8A-44A6-AF6A-4D64F5F6F97B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3FF846EF-3F8A-44A6-AF6A-4D64F5F6F97B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:3FF846EF-3F8A-44A6-AF6A-4D64F5F6F97B_ret|text=|trigger=button}{sub-section}{sub-section:3FF846EF-3F8A-44A6-AF6A-4D64F5F6F97B_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:3FF846EF-3F8A-44A6-AF6A-4D64F5F6F97B_see|text=|trigger=button}{sub-section}{sub-section:3FF846EF-3F8A-44A6-AF6A-4D64F5F6F97B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3FF846EF-3F8A-44A6-AF6A-4D64F5F6F97B_see|text=|trigger=button}{sub-section}{sub-section:3FF846EF-3F8A-44A6-AF6A-4D64F5F6F97B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3FF846EF-3F8A-44A6-AF6A-4D64F5F6F97B_sam|text=|trigger=button}{sub-section}{sub-section:3FF846EF-3F8A-44A6-AF6A-4D64F5F6F97B_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('./big.jpg'); if (f.exists()) { application.output('is absolute: ' + f.isAbsolute()); application.output('is dir: ' + f.isDirectory()); application.output('is file: ' + f.isFile()); application.output('is hidden: ' + f.isHidden()); application.output('can read: ' + f.canRead()); application.output('can write: ' + f.canWrite()); application.output('last modified: ' + f.lastModified()); application.output('name: ' + f.getName()); application.output('path: ' + f.getPath()); application.output('absolute path: ' + f.getAbsolutePath()); application.output('content type: ' + f.getContentType()); application.output('size: ' + f.size()); } else { application.output('File/folder not found.'); } {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=CEEA5667-DC46-498D-B093-E24243595A92}{tr:id=name}{td}h6.isAbsolute{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}isAbsolute{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:CEEA5667-DC46-498D-B093-E24243595A92_des|text=|trigger=button}{sub-section}{sub-section:CEEA5667-DC46-498D-B093-E24243595A92_des|trigger=none|class=sIndent}Returns true if the path is absolute. The path is absolute if it starts with '/' on Unix/Linux/MacOS or has a driver letter on Windows.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:CEEA5667-DC46-498D-B093-E24243595A92_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CEEA5667-DC46-498D-B093-E24243595A92_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:CEEA5667-DC46-498D-B093-E24243595A92_ret|text=|trigger=button}{sub-section}{sub-section:CEEA5667-DC46-498D-B093-E24243595A92_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:CEEA5667-DC46-498D-B093-E24243595A92_see|text=|trigger=button}{sub-section}{sub-section:CEEA5667-DC46-498D-B093-E24243595A92_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:CEEA5667-DC46-498D-B093-E24243595A92_see|text=|trigger=button}{sub-section}{sub-section:CEEA5667-DC46-498D-B093-E24243595A92_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:CEEA5667-DC46-498D-B093-E24243595A92_sam|text=|trigger=button}{sub-section}{sub-section:CEEA5667-DC46-498D-B093-E24243595A92_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('./big.jpg'); if (f.exists()) { application.output('is absolute: ' + f.isAbsolute()); application.output('is dir: ' + f.isDirectory()); application.output('is file: ' + f.isFile()); application.output('is hidden: ' + f.isHidden()); application.output('can read: ' + f.canRead()); application.output('can write: ' + f.canWrite()); application.output('last modified: ' + f.lastModified()); application.output('name: ' + f.getName()); application.output('path: ' + f.getPath()); application.output('absolute path: ' + f.getAbsolutePath()); application.output('content type: ' + f.getContentType()); application.output('size: ' + f.size()); } else { application.output('File/folder not found.'); } {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=74671D68-7FAC-401B-8DB7-83D7924D7702}{tr:id=name}{td}h6.isDirectory{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}isDirectory{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:74671D68-7FAC-401B-8DB7-83D7924D7702_des|text=|trigger=button}{sub-section}{sub-section:74671D68-7FAC-401B-8DB7-83D7924D7702_des|trigger=none|class=sIndent}Returns true if the file is a directory.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:74671D68-7FAC-401B-8DB7-83D7924D7702_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:74671D68-7FAC-401B-8DB7-83D7924D7702_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:74671D68-7FAC-401B-8DB7-83D7924D7702_ret|text=|trigger=button}{sub-section}{sub-section:74671D68-7FAC-401B-8DB7-83D7924D7702_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:74671D68-7FAC-401B-8DB7-83D7924D7702_see|text=|trigger=button}{sub-section}{sub-section:74671D68-7FAC-401B-8DB7-83D7924D7702_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:74671D68-7FAC-401B-8DB7-83D7924D7702_see|text=|trigger=button}{sub-section}{sub-section:74671D68-7FAC-401B-8DB7-83D7924D7702_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:74671D68-7FAC-401B-8DB7-83D7924D7702_sam|text=|trigger=button}{sub-section}{sub-section:74671D68-7FAC-401B-8DB7-83D7924D7702_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('./big.jpg'); if (f.exists()) { application.output('is absolute: ' + f.isAbsolute()); application.output('is dir: ' + f.isDirectory()); application.output('is file: ' + f.isFile()); application.output('is hidden: ' + f.isHidden()); application.output('can read: ' + f.canRead()); application.output('can write: ' + f.canWrite()); application.output('last modified: ' + f.lastModified()); application.output('name: ' + f.getName()); application.output('path: ' + f.getPath()); application.output('absolute path: ' + f.getAbsolutePath()); application.output('content type: ' + f.getContentType()); application.output('size: ' + f.size()); } else { application.output('File/folder not found.'); } {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F0B09764-A374-42EC-B6B4-B7385D7EA504}{tr:id=name}{td}h6.isFile{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}isFile{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:F0B09764-A374-42EC-B6B4-B7385D7EA504_des|text=|trigger=button}{sub-section}{sub-section:F0B09764-A374-42EC-B6B4-B7385D7EA504_des|trigger=none|class=sIndent}Returns true if the file is a file and not a regular file.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:F0B09764-A374-42EC-B6B4-B7385D7EA504_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F0B09764-A374-42EC-B6B4-B7385D7EA504_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F0B09764-A374-42EC-B6B4-B7385D7EA504_ret|text=|trigger=button}{sub-section}{sub-section:F0B09764-A374-42EC-B6B4-B7385D7EA504_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F0B09764-A374-42EC-B6B4-B7385D7EA504_see|text=|trigger=button}{sub-section}{sub-section:F0B09764-A374-42EC-B6B4-B7385D7EA504_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F0B09764-A374-42EC-B6B4-B7385D7EA504_see|text=|trigger=button}{sub-section}{sub-section:F0B09764-A374-42EC-B6B4-B7385D7EA504_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F0B09764-A374-42EC-B6B4-B7385D7EA504_sam|text=|trigger=button}{sub-section}{sub-section:F0B09764-A374-42EC-B6B4-B7385D7EA504_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('./big.jpg'); if (f.exists()) { application.output('is absolute: ' + f.isAbsolute()); application.output('is dir: ' + f.isDirectory()); application.output('is file: ' + f.isFile()); application.output('is hidden: ' + f.isHidden()); application.output('can read: ' + f.canRead()); application.output('can write: ' + f.canWrite()); application.output('last modified: ' + f.lastModified()); application.output('name: ' + f.getName()); application.output('path: ' + f.getPath()); application.output('absolute path: ' + f.getAbsolutePath()); application.output('content type: ' + f.getContentType()); application.output('size: ' + f.size()); } else { application.output('File/folder not found.'); } {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=0F68FE2F-5E8C-4B34-848E-EAA5CCC7289A}{tr:id=name}{td}h6.isHidden{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}isHidden{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:0F68FE2F-5E8C-4B34-848E-EAA5CCC7289A_des|text=|trigger=button}{sub-section}{sub-section:0F68FE2F-5E8C-4B34-848E-EAA5CCC7289A_des|trigger=none|class=sIndent}Returns true if the file is hidden (a file system attribute).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:0F68FE2F-5E8C-4B34-848E-EAA5CCC7289A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0F68FE2F-5E8C-4B34-848E-EAA5CCC7289A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:0F68FE2F-5E8C-4B34-848E-EAA5CCC7289A_ret|text=|trigger=button}{sub-section}{sub-section:0F68FE2F-5E8C-4B34-848E-EAA5CCC7289A_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:0F68FE2F-5E8C-4B34-848E-EAA5CCC7289A_see|text=|trigger=button}{sub-section}{sub-section:0F68FE2F-5E8C-4B34-848E-EAA5CCC7289A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0F68FE2F-5E8C-4B34-848E-EAA5CCC7289A_see|text=|trigger=button}{sub-section}{sub-section:0F68FE2F-5E8C-4B34-848E-EAA5CCC7289A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:0F68FE2F-5E8C-4B34-848E-EAA5CCC7289A_sam|text=|trigger=button}{sub-section}{sub-section:0F68FE2F-5E8C-4B34-848E-EAA5CCC7289A_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('./big.jpg'); if (f.exists()) { application.output('is absolute: ' + f.isAbsolute()); application.output('is dir: ' + f.isDirectory()); application.output('is file: ' + f.isFile()); application.output('is hidden: ' + f.isHidden()); application.output('can read: ' + f.canRead()); application.output('can write: ' + f.canWrite()); application.output('last modified: ' + f.lastModified()); application.output('name: ' + f.getName()); application.output('path: ' + f.getPath()); application.output('absolute path: ' + f.getAbsolutePath()); application.output('content type: ' + f.getContentType()); application.output('size: ' + f.size()); } else { application.output('File/folder not found.'); } {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=9701B476-4AD6-4F31-885F-196328052928}{tr:id=name}{td}h6.lastModified{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Date]{span}{span:id=iets|style=float: left; font-weight: bold;}lastModified{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:9701B476-4AD6-4F31-885F-196328052928_des|text=|trigger=button}{sub-section}{sub-section:9701B476-4AD6-4F31-885F-196328052928_des|trigger=none|class=sIndent}Returns the time/date of the last modification on the file.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:9701B476-4AD6-4F31-885F-196328052928_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9701B476-4AD6-4F31-885F-196328052928_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:9701B476-4AD6-4F31-885F-196328052928_ret|text=|trigger=button}{sub-section}{sub-section:9701B476-4AD6-4F31-885F-196328052928_ret|trigger=none|class=sIndent}[Date]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:9701B476-4AD6-4F31-885F-196328052928_see|text=|trigger=button}{sub-section}{sub-section:9701B476-4AD6-4F31-885F-196328052928_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:9701B476-4AD6-4F31-885F-196328052928_see|text=|trigger=button}{sub-section}{sub-section:9701B476-4AD6-4F31-885F-196328052928_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:9701B476-4AD6-4F31-885F-196328052928_sam|text=|trigger=button}{sub-section}{sub-section:9701B476-4AD6-4F31-885F-196328052928_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('./big.jpg'); if (f.exists()) { application.output('is absolute: ' + f.isAbsolute()); application.output('is dir: ' + f.isDirectory()); application.output('is file: ' + f.isFile()); application.output('is hidden: ' + f.isHidden()); application.output('can read: ' + f.canRead()); application.output('can write: ' + f.canWrite()); application.output('last modified: ' + f.lastModified()); application.output('name: ' + f.getName()); application.output('path: ' + f.getPath()); application.output('absolute path: ' + f.getAbsolutePath()); application.output('content type: ' + f.getContentType()); application.output('size: ' + f.size()); } else { application.output('File/folder not found.'); } {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=1601F8AE-5687-4C0C-B1C5-8F4B33717374}{tr:id=name}{td}h6.list{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}list{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:1601F8AE-5687-4C0C-B1C5-8F4B33717374_des|text=|trigger=button}{sub-section}{sub-section:1601F8AE-5687-4C0C-B1C5-8F4B33717374_des|trigger=none|class=sIndent}Returns an array of strings naming the files and directories located inside the file, if the file is a directory.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:1601F8AE-5687-4C0C-B1C5-8F4B33717374_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1601F8AE-5687-4C0C-B1C5-8F4B33717374_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:1601F8AE-5687-4C0C-B1C5-8F4B33717374_ret|text=|trigger=button}{sub-section}{sub-section:1601F8AE-5687-4C0C-B1C5-8F4B33717374_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1601F8AE-5687-4C0C-B1C5-8F4B33717374_see|text=|trigger=button}{sub-section}{sub-section:1601F8AE-5687-4C0C-B1C5-8F4B33717374_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1601F8AE-5687-4C0C-B1C5-8F4B33717374_see|text=|trigger=button}{sub-section}{sub-section:1601F8AE-5687-4C0C-B1C5-8F4B33717374_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1601F8AE-5687-4C0C-B1C5-8F4B33717374_sam|text=|trigger=button}{sub-section}{sub-section:1601F8AE-5687-4C0C-B1C5-8F4B33717374_sam|class=sIndent|trigger=none}{code:language=javascript} var d = plugins.file.convertToJSFile('plugins'); var names = d.list(); application.output('Names:'); for (var i=0; i<names.length; i++) application.output(names[i]); var files = d.listFiles(); application.output('Absolute paths:'); for (var i=0; i<files.length; i++) application.output(files[i].getAbsolutePath()); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=14C5194D-4D29-461A-8764-2B6D00B54922}{tr:id=name}{td}h6.listFiles{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSFile]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}listFiles{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:14C5194D-4D29-461A-8764-2B6D00B54922_des|text=|trigger=button}{sub-section}{sub-section:14C5194D-4D29-461A-8764-2B6D00B54922_des|trigger=none|class=sIndent}Returns an array of JSFiles naming the files and directories located inside the file, if the file is a directory.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:14C5194D-4D29-461A-8764-2B6D00B54922_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:14C5194D-4D29-461A-8764-2B6D00B54922_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:14C5194D-4D29-461A-8764-2B6D00B54922_ret|text=|trigger=button}{sub-section}{sub-section:14C5194D-4D29-461A-8764-2B6D00B54922_ret|trigger=none|class=sIndent}[JSFile]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:14C5194D-4D29-461A-8764-2B6D00B54922_see|text=|trigger=button}{sub-section}{sub-section:14C5194D-4D29-461A-8764-2B6D00B54922_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:14C5194D-4D29-461A-8764-2B6D00B54922_see|text=|trigger=button}{sub-section}{sub-section:14C5194D-4D29-461A-8764-2B6D00B54922_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:14C5194D-4D29-461A-8764-2B6D00B54922_sam|text=|trigger=button}{sub-section}{sub-section:14C5194D-4D29-461A-8764-2B6D00B54922_sam|class=sIndent|trigger=none}{code:language=javascript} var d = plugins.file.convertToJSFile('plugins'); var names = d.list(); application.output('Names:'); for (var i=0; i<names.length; i++) application.output(names[i]); var files = d.listFiles(); application.output('Absolute paths:'); for (var i=0; i<files.length; i++) application.output(files[i].getAbsolutePath()); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=0E2AF77C-DEB6-4221-939A-76A5BFB00DC1}{tr:id=name}{td}h6.mkdir{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}mkdir{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:0E2AF77C-DEB6-4221-939A-76A5BFB00DC1_des|text=|trigger=button}{sub-section}{sub-section:0E2AF77C-DEB6-4221-939A-76A5BFB00DC1_des|trigger=none|class=sIndent}Creates a directory on disk if possible. Returns true if a new directory was created.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:0E2AF77C-DEB6-4221-939A-76A5BFB00DC1_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0E2AF77C-DEB6-4221-939A-76A5BFB00DC1_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:0E2AF77C-DEB6-4221-939A-76A5BFB00DC1_ret|text=|trigger=button}{sub-section}{sub-section:0E2AF77C-DEB6-4221-939A-76A5BFB00DC1_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:0E2AF77C-DEB6-4221-939A-76A5BFB00DC1_see|text=|trigger=button}{sub-section}{sub-section:0E2AF77C-DEB6-4221-939A-76A5BFB00DC1_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0E2AF77C-DEB6-4221-939A-76A5BFB00DC1_see|text=|trigger=button}{sub-section}{sub-section:0E2AF77C-DEB6-4221-939A-76A5BFB00DC1_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:0E2AF77C-DEB6-4221-939A-76A5BFB00DC1_sam|text=|trigger=button}{sub-section}{sub-section:0E2AF77C-DEB6-4221-939A-76A5BFB00DC1_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('one/two/three/four'); f.mkdirs(); // Create all four levels of folders in one step. var g = plugins.file.convertToJSFile('one/two/three/four/five'); g.mkdir(); // This will work because all parent folders are already created. {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=9302775C-574F-48C0-875B-CC72BD3C07C2}{tr:id=name}{td}h6.mkdirs{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}mkdirs{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:9302775C-574F-48C0-875B-CC72BD3C07C2_des|text=|trigger=button}{sub-section}{sub-section:9302775C-574F-48C0-875B-CC72BD3C07C2_des|trigger=none|class=sIndent}Creates a directory on disk, together with all its parent directories, if possible. Returns true if the hierarchy of directories is created.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:9302775C-574F-48C0-875B-CC72BD3C07C2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9302775C-574F-48C0-875B-CC72BD3C07C2_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:9302775C-574F-48C0-875B-CC72BD3C07C2_ret|text=|trigger=button}{sub-section}{sub-section:9302775C-574F-48C0-875B-CC72BD3C07C2_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:9302775C-574F-48C0-875B-CC72BD3C07C2_see|text=|trigger=button}{sub-section}{sub-section:9302775C-574F-48C0-875B-CC72BD3C07C2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:9302775C-574F-48C0-875B-CC72BD3C07C2_see|text=|trigger=button}{sub-section}{sub-section:9302775C-574F-48C0-875B-CC72BD3C07C2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:9302775C-574F-48C0-875B-CC72BD3C07C2_sam|text=|trigger=button}{sub-section}{sub-section:9302775C-574F-48C0-875B-CC72BD3C07C2_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('one/two/three/four'); f.mkdirs(); // Create all four levels of folders in one step. var g = plugins.file.convertToJSFile('one/two/three/four/five'); g.mkdir(); // This will work because all parent folders are already created. {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=7A822AAA-FBB5-4241-87D9-4C74909CEA2E}{tr:id=name}{td}h6.renameTo{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}renameTo{span}{span:id=iets|style=float: left;}\(destination){span}{td}{tr}{tr:id=des}{td}{sub-section:7A822AAA-FBB5-4241-87D9-4C74909CEA2E_des|text=|trigger=button}{sub-section}{sub-section:7A822AAA-FBB5-4241-87D9-4C74909CEA2E_des|trigger=none|class=sIndent}Renames the file to a different name. Returns true if the file could be renamed.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:7A822AAA-FBB5-4241-87D9-4C74909CEA2E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7A822AAA-FBB5-4241-87D9-4C74909CEA2E_prs|trigger=none}destination {sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:7A822AAA-FBB5-4241-87D9-4C74909CEA2E_ret|text=|trigger=button}{sub-section}{sub-section:7A822AAA-FBB5-4241-87D9-4C74909CEA2E_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:7A822AAA-FBB5-4241-87D9-4C74909CEA2E_see|text=|trigger=button}{sub-section}{sub-section:7A822AAA-FBB5-4241-87D9-4C74909CEA2E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7A822AAA-FBB5-4241-87D9-4C74909CEA2E_see|text=|trigger=button}{sub-section}{sub-section:7A822AAA-FBB5-4241-87D9-4C74909CEA2E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7A822AAA-FBB5-4241-87D9-4C74909CEA2E_sam|text=|trigger=button}{sub-section}{sub-section:7A822AAA-FBB5-4241-87D9-4C74909CEA2E_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('story.txt'); f.renameTo('otherstory.txt'); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=73A4536D-6733-4548-9D89-EBB3BC9ED4FF}{tr:id=name}{td}h6.setLastModified{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}setLastModified{span}{span:id=iets|style=float: left;}\(date){span}{td}{tr}{tr:id=des}{td}{sub-section:73A4536D-6733-4548-9D89-EBB3BC9ED4FF_des|text=|trigger=button}{sub-section}{sub-section:73A4536D-6733-4548-9D89-EBB3BC9ED4FF_des|trigger=none|class=sIndent}Sets the date/time of the last modification on the file.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:73A4536D-6733-4548-9D89-EBB3BC9ED4FF_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:73A4536D-6733-4548-9D89-EBB3BC9ED4FF_prs|trigger=none}date {sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:73A4536D-6733-4548-9D89-EBB3BC9ED4FF_ret|text=|trigger=button}{sub-section}{sub-section:73A4536D-6733-4548-9D89-EBB3BC9ED4FF_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:73A4536D-6733-4548-9D89-EBB3BC9ED4FF_see|text=|trigger=button}{sub-section}{sub-section:73A4536D-6733-4548-9D89-EBB3BC9ED4FF_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:73A4536D-6733-4548-9D89-EBB3BC9ED4FF_see|text=|trigger=button}{sub-section}{sub-section:73A4536D-6733-4548-9D89-EBB3BC9ED4FF_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:73A4536D-6733-4548-9D89-EBB3BC9ED4FF_sam|text=|trigger=button}{sub-section}{sub-section:73A4536D-6733-4548-9D89-EBB3BC9ED4FF_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('story.txt'); f.createNewFile(); // Make the file look old. f.setLastModified(new Date(1999, 5, 21)); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=CA978559-1EDC-4076-8912-753AD819B6B2}{tr:id=name}{td}h6.setReadOnly{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}setReadOnly{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:CA978559-1EDC-4076-8912-753AD819B6B2_des|text=|trigger=button}{sub-section}{sub-section:CA978559-1EDC-4076-8912-753AD819B6B2_des|trigger=none|class=sIndent}Sets the readonly attribute of the file/directory. Returns true on success.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:CA978559-1EDC-4076-8912-753AD819B6B2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CA978559-1EDC-4076-8912-753AD819B6B2_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:CA978559-1EDC-4076-8912-753AD819B6B2_ret|text=|trigger=button}{sub-section}{sub-section:CA978559-1EDC-4076-8912-753AD819B6B2_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:CA978559-1EDC-4076-8912-753AD819B6B2_see|text=|trigger=button}{sub-section}{sub-section:CA978559-1EDC-4076-8912-753AD819B6B2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:CA978559-1EDC-4076-8912-753AD819B6B2_see|text=|trigger=button}{sub-section}{sub-section:CA978559-1EDC-4076-8912-753AD819B6B2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:CA978559-1EDC-4076-8912-753AD819B6B2_sam|text=|trigger=button}{sub-section}{sub-section:CA978559-1EDC-4076-8912-753AD819B6B2_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('invoice.txt'); plugins.file.writeTXTFile(f, 'important data that should not be changed'); f.setReadOnly(); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=4DC76D63-5DA8-45B8-B940-08254105E4DA}{tr:id=name}{td}h6.size{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}size{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:4DC76D63-5DA8-45B8-B940-08254105E4DA_des|text=|trigger=button}{sub-section}{sub-section:4DC76D63-5DA8-45B8-B940-08254105E4DA_des|trigger=none|class=sIndent}Returns the size in bytes of the file. Returns 0 if the file does not exist on disk.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:4DC76D63-5DA8-45B8-B940-08254105E4DA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4DC76D63-5DA8-45B8-B940-08254105E4DA_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:4DC76D63-5DA8-45B8-B940-08254105E4DA_ret|text=|trigger=button}{sub-section}{sub-section:4DC76D63-5DA8-45B8-B940-08254105E4DA_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4DC76D63-5DA8-45B8-B940-08254105E4DA_see|text=|trigger=button}{sub-section}{sub-section:4DC76D63-5DA8-45B8-B940-08254105E4DA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4DC76D63-5DA8-45B8-B940-08254105E4DA_see|text=|trigger=button}{sub-section}{sub-section:4DC76D63-5DA8-45B8-B940-08254105E4DA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4DC76D63-5DA8-45B8-B940-08254105E4DA_sam|text=|trigger=button}{sub-section}{sub-section:4DC76D63-5DA8-45B8-B940-08254105E4DA_sam|class=sIndent|trigger=none}{code:language=javascript} var f = plugins.file.convertToJSFile('./big.jpg'); if (f.exists()) { application.output('is absolute: ' + f.isAbsolute()); application.output('is dir: ' + f.isDirectory()); application.output('is file: ' + f.isFile()); application.output('is hidden: ' + f.isHidden()); application.output('can read: ' + f.canRead()); application.output('can write: ' + f.canWrite()); application.output('last modified: ' + f.lastModified()); application.output('name: ' + f.getName()); application.output('path: ' + f.getPath()); application.output('absolute path: ' + f.getAbsolutePath()); application.output('content type: ' + f.getContentType()); application.output('size: ' + f.size()); } else { application.output('File/folder not found.'); } {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
not a regular file - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isHiddenname

isHidden()

dessIndent
Returns true if the file is hidden (a file system attribute) - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
lastModifiedname

lastModified()

dessIndent
Returns the time/date of the last modification on the file - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
listname

list()

dessIndent
Returns an array of strings naming the files and directories located inside the file, if the file is a directory - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
listFilesname

listFiles()

dessIndent
Returns an array of JSFiles naming the files and directories located inside the file, if the file is a directory - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
mkdirname

mkdir()

dessIndent
Creates a directory on disk if possible. Returns true if a new directory was created - for remote, use the streamFilesToServer to create the directory instead.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
mkdirsname

mkdirs()

dessIndent
Creates a directory on disk, together with all its parent directories, if possible. Returns true if the hierarchy of directories is created - for remote, use the streamFilesToServer to create the directories instead.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
renameToname

renameTo(destination)

dessIndent
Renames the file to a different name. Returns true if the file could be renamed - works on remote files too.
prs

Parameters

sIndentdestination ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setBytesname

setBytes(bytes)

dessIndent
Set the content of the file (local or remote) to the bytes provided
Will not create a new file if one doesn't exist
prs

Parameters

sIndentbytesthe data
ret

Returns

sIndent true if the operation worked
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setBytesname

setBytes(bytes, createFile)

dessIndent
Set the content of the file (local or remote) to the bytes provided
prs

Parameters

sIndentbytesthe datacreateFiletrue to create a file if it doesn't exist
ret

Returns

sIndent true if the operation worked
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setLastModifiedname

setLastModified(date)

dessIndent
Sets the date/time of the last modification on the file.
prs

Parameters

sIndentdate ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setReadOnlyname

setReadOnly()

dessIndent
Sets the readonly attribute of the file/directory. Returns true on success.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
sizename

size()

dessIndent
Returns the size in bytes of the file. Returns 0 if the file does not exist on disk - works on remote files too.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow