Child pages
  • JSFile

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{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:id=|class=servoy sSummery}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method SummarySummery{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#canRead]\()
Returns true if the file exists and is readable (has access to it) \- works on remote files too.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#canWrite]\()
Returns true if the file exists and can be modified \- works on remote files too.{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 \- works on remote files too.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#getAbsoluteFile]\()
Returns a JSFile instance that corresponds to the absolute form of this pathname \- works on remote files too.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getAbsolutePath]\()
Returns a String representation of the absolute form of this pathname \- works on remote files too.{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' \- works on remote files too.{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 \- works on remote files too.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#getParentFile]\()
Returns a JSFile instance that corresponds to the parent of this file \- works on remote files too.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getPath]\()
Returns a String holding the path to the file \- works on remote files too.{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]\()
Returns true if the file is a directory \- works on remote files too.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isFile]\()
Returns true if the file is a file and not a regular file \- works on remote files too.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isHidden]\()
Returns true if the file is hidden (a file system attribute).{td}{ \- works on remote files too.{td}{tr}{tbody}{tbody}{tr}{td}[Date]{td}{td}[#lastModified]\()
Returns the time/date of the last modification on the file \- works on remote files too.{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 \- works on remote files too.{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 \- works on remote files too.{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:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=5E9D089A-FBB2-4BE2-89D9-93EBC5E71AC3=canRead|class=node}{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:5E9D089A-FBB2-4BE2-89D9-93EBC5E71AC3canRead_des|text=|trigger=button}{sub-section}{sub-section:5E9D089A-FBB2-4BE2-89D9-93EBC5E71AC3canRead_des|trigger=none|class=sIndent}Returns true if the file exists and is readable (has access to it) \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:5E9D089A-FBB2-4BE2-89D9-93EBC5E71AC3_prscanRead_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5E9D089A-FBB2-4BE2-89D9-93EBC5E71AC3_prscanRead_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{div}{td}{tr}{builder-show}{tr:builder-show:permission=edit}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:5E9D089A-FBB2-4BE2-89D9-93EBC5E71AC3canRead_prs|text=|trigger=button}{sub-section}{sub-section:canRead_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:canRead_ret|text=|trigger=button}{sub-section}{sub-section:5E9D089A-FBB2-4BE2-89D9-93EBC5E71AC3canRead_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5E9D089A-FBB2-4BE2-89D9-93EBC5E71AC3canRead_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5E9D089A-FBB2-4BE2-89D9-93EBC5E71AC3canRead_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5E9D089A-FBB2-4BE2-89D9-93EBC5E71AC3_seecanRead_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5E9D089A-FBB2-4BE2-89D9-93EBC5E71AC3canRead_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5E9D089A-FBB2-4BE2-89D9-93EBC5E71AC3canRead_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5E9D089A-FBB2-4BE2-89D9-93EBC5E71AC3canRead_sam|class=sIndent|trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('./big.jpg');
// or for a remote file:
// var f = plugins.convertToRemoteJSFile('/images/big.jpg');
if (f && 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=62E6836E-C4F4-465A-8858-7ED2B04A8FBFcanWrite|class=node}{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:62E6836E-C4F4-465A-8858-7ED2B04A8FBFcanWrite_des|text=|trigger=button}{sub-section}{sub-section:62E6836E-C4F4-465A-8858-7ED2B04A8FBFcanWrite_des|trigger=none|class=sIndent}Returns true if the file exists and can be modified \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:62E6836E-C4F4-465A-8858-7ED2B04A8FBF_prscanWrite_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:62E6836E-C4F4-465A-8858-7ED2B04A8FBF_prscanWrite_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:62E6836E-C4F4-465A-8858-7ED2B04A8FBF_retcanWrite_prs|text=|trigger=button}{sub-section}{sub-section:62E6836E-C4F4-465A-8858-7ED2B04A8FBF_retcanWrite_prs|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:62E6836E-C4F4-465A-8858-7ED2B04A8FBF_seecanWrite_ret|text=|trigger=button}{sub-section}{sub-section:62E6836E-C4F4-465A-8858-7ED2B04A8FBF_seecanWrite_ret|trigger=none|class=sIndent|trigger=none}}[Boolean]{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksee}{td}*ExternalAlso linkssee*\\{sub-section:62E6836E-C4F4-465A-8858-7ED2B04A8FBFcanWrite_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:62E6836E-C4F4-465A-8858-7ED2B04A8FBF_link|class=sIndentcanWrite_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=samlink}{td}*SampleExternal links*\\{sub-section:62E6836E-C4F4-465A-8858-7ED2B04A8FBF_samcanWrite_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:62E6836E-C4F4-465A-8858-7ED2B04A8FBF_sam|class=sIndentcanWrite_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:canWrite_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:canWrite_sam|trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('./big.jpg');
// or for a remote file:
// var f = plugins.convertToRemoteJSFile('/images/big.jpg');
if (f && 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=C875B768-AEF8-4FDC-B046-71C5563D06EE=createNewFile|class=node}{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:C875B768-AEF8-4FDC-B046-71C5563D06EE_des|createNewFile_des|text=|trigger=button}{sub-section}{sub-section:C875B768-AEF8-4FDC-B046-71C5563D06EEcreateNewFile_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 \- for remote, use the streamFilesToServer to stream a file.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:C875B768-AEF8-4FDC-B046-71C5563D06EE_prscreateNewFile_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C875B768-AEF8-4FDC-B046-71C5563D06EE_prscreateNewFile_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{divtd}{tdtr}{trbuilder-show}{builder-show:permission=edit}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:C875B768-AEF8-4FDC-B046-71C5563D06EE_retcreateNewFile_prs|text=|trigger=button}{sub-section}{sub-section:C875B768-AEF8-4FDC-B046-71C5563D06EE_retcreateNewFile_prs|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:C875B768-AEF8-4FDC-B046-71C5563D06EE_seecreateNewFile_ret|text=|trigger=button}{sub-section}{sub-section:C875B768-AEF8-4FDC-B046-71C5563D06EE_see|class=sIndentcreateNewFile_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:createNewFile_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createNewFile_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C875B768-AEF8-4FDC-B046-71C5563D06EE_seecreateNewFile_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C875B768-AEF8-4FDC-B046-71C5563D06EEcreateNewFile_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C875B768-AEF8-4FDC-B046-71C5563D06EEcreateNewFile_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C875B768-AEF8-4FDC-B046-71C5563D06EEcreateNewFile_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}{tddiv}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AA695941-7C3B-483F-9252-30BACDF46A60deleteFile|class=node}{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:AA695941-7C3B-483F-9252-30BACDF46A60deleteFile_des|text=|trigger=button}{sub-section}{sub-section:AA695941-7C3B-483F-9252-30BACDF46A60deleteFile_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 \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:AA695941-7C3B-483F-9252-30BACDF46A60_prsdeleteFile_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AA695941-7C3B-483F-9252-30BACDF46A60_prsdeleteFile_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{divtd}{tdtr}{trbuilder-show}{builder-show:permission=edit}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:AA695941-7C3B-483F-9252-30BACDF46A60_retdeleteFile_prs|text=|trigger=button}{sub-section}{sub-section:AA695941-7C3B-483F-9252-30BACDF46A60_retdeleteFile_prs|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:AA695941-7C3B-483F-9252-30BACDF46A60_seedeleteFile_ret|text=|trigger=button}{sub-section}{sub-section:AA695941-7C3B-483F-9252-30BACDF46A60_see|class=sIndentdeleteFile_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:deleteFile_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:deleteFile_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AA695941-7C3B-483F-9252-30BACDF46A60_seedeleteFile_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AA695941-7C3B-483F-9252-30BACDF46A60deleteFile_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AA695941-7C3B-483F-9252-30BACDF46A60deleteFile_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AA695941-7C3B-483F-9252-30BACDF46A60deleteFile_sam|class=sIndent|trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('story.txt');
if (f.exists())
	f.deleteFile();
else
	f.createNewFile// or for a remote file:
// var f = plugins.convertToRemoteJSFile('/story.txt');
if (f && f.exists())
	f.deleteFile();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AA23E264-4D41-476F-8478-3B69A4493B55=exists|class=node}{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:AA23E264-4D41-476F-8478-3B69A4493B55exists_des|text=|trigger=button}{sub-section}{sub-section:AA23E264-4D41-476F-8478-3B69A4493B55exists_des|trigger=none|class=sIndent}Returns true if the file/directory exists on the filesystem \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:AA23E264-4D41-476F-8478-3B69A4493B55_prsexists_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AA23E264-4D41-476F-8478-3B69A4493B55_prsexists_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{divtd}{tdtr}{trbuilder-show}{builder-show:permission=edit}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:AA23E264-4D41-476F-8478-3B69A4493B55exists_prs|text=|trigger=button}{sub-section}{sub-section:exists_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:exists_ret|text=|trigger=button}{sub-section}{sub-section:AA23E264-4D41-476F-8478-3B69A4493B55exists_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AA23E264-4D41-476F-8478-3B69A4493B55exists_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AA23E264-4D41-476F-8478-3B69A4493B55exists_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AA23E264-4D41-476F-8478-3B69A4493B55_seeexists_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AA23E264-4D41-476F-8478-3B69A4493B55exists_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AA23E264-4D41-476F-8478-3B69A4493B55exists_sam|text=|trigger=button}{sub-section}{subdiv:class=sIndent}{sub-section:AA23E264-4D41-476F-8478-3B69A4493B55exists_sam|class=sIndent|trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('./big.jpg');
// or for a remote file:
// var f = plugins.convertToRemoteJSFile('/images/big.jpg');
if (f && 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=D5665CD2-A41D-42CF-9168-4F852B5AF4B9=getAbsoluteFile|class=node}{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:D5665CD2-A41D-42CF-9168-4F852B5AF4B9getAbsoluteFile_des|text=|trigger=button}{sub-section}{sub-section:D5665CD2-A41D-42CF-9168-4F852B5AF4B9getAbsoluteFile_des|trigger=none|class=sIndent}Returns a JSFile instance that corresponds to the absolute form of this pathname \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:D5665CD2-A41D-42CF-9168-4F852B5AF4B9_prsgetAbsoluteFile_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D5665CD2-A41D-42CF-9168-4F852B5AF4B9_prsgetAbsoluteFile_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:D5665CD2-A41D-42CF-9168-4F852B5AF4B9_retgetAbsoluteFile_prs|text=|trigger=button}{sub-section}{sub-section:D5665CD2-A41D-42CF-9168-4F852B5AF4B9_retgetAbsoluteFile_prs|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:D5665CD2-A41D-42CF-9168-4F852B5AF4B9_seegetAbsoluteFile_ret|text=|trigger=button}{sub-section}{sub-section:D5665CD2-A41D-42CF-9168-4F852B5AF4B9_seegetAbsoluteFile_ret|trigger=none|class=sIndent|trigger=none}}[JSFile]{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksee}{td}*ExternalAlso linkssee*\\{sub-section:D5665CD2-A41D-42CF-9168-4F852B5AF4B9getAbsoluteFile_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D5665CD2-A41D-42CF-9168-4F852B5AF4B9_link|class=sIndentgetAbsoluteFile_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=samlink}{td}*SampleExternal links*\\{sub-section:D5665CD2-A41D-42CF-9168-4F852B5AF4B9_samgetAbsoluteFile_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D5665CD2-A41D-42CF-9168-4F852B5AF4B9_sam|class=sIndentgetAbsoluteFile_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getAbsoluteFile_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getAbsoluteFile_sam|trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('story.txt');
// or for a remote file:
// var f = plugins.convertToRemoteJSFile('/story.txt');
application.output('parent folder: ' + f.getAbsoluteFile().getParent());
application.output('parent folder has ' + f.getAbsoluteFile().getParentFile().listFiles().length + ' entries');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=625F3843-5DCC-4AF0-8EA2-6409A97C6349=getAbsolutePath|class=node}{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:625F3843-5DCC-4AF0-8EA2-6409A97C6349getAbsolutePath_des|text=|trigger=button}{sub-section}{sub-section:625F3843-5DCC-4AF0-8EA2-6409A97C6349getAbsolutePath_des|trigger=none|class=sIndent}Returns a String representation of the absolute form of this pathname.{sub- \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:625F3843-5DCC-4AF0-8EA2-6409A97C6349_prsgetAbsolutePath_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:625F3843-5DCC-4AF0-8EA2-6409A97C6349_prsgetAbsolutePath_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{divtd}{tdtr}{trbuilder-show}{builder-show:permission=edit}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:625F3843-5DCC-4AF0-8EA2-6409A97C6349_retgetAbsolutePath_prs|text=|trigger=button}{sub-section}{sub-section:625F3843-5DCC-4AF0-8EA2-6409A97C6349_retgetAbsolutePath_prs|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:625F3843-5DCC-4AF0-8EA2-6409A97C6349_seegetAbsolutePath_ret|text=|trigger=button}{sub-section}{sub-section:625F3843-5DCC-4AF0-8EA2-6409A97C6349_seegetAbsolutePath_ret|trigger=none|class=sIndent|trigger=none}}[String]{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksee}{td}*ExternalAlso linkssee*\\{sub-section:625F3843-5DCC-4AF0-8EA2-6409A97C6349getAbsolutePath_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:625F3843-5DCC-4AF0-8EA2-6409A97C6349_link|class=sIndentgetAbsolutePath_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getAbsolutePath_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getAbsolutePath_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:625F3843-5DCC-4AF0-8EA2-6409A97C6349getAbsolutePath_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:625F3843-5DCC-4AF0-8EA2-6409A97C6349getAbsolutePath_sam|class=sIndent|trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('./big.jpg');
// or for a remote file:
// var f = plugins.convertToRemoteJSFile('/images/big.jpg');
if (f && 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=3A3B074D-72D6-4BBB-8CF8-83D3CFC0030EgetBytes|class=node}{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:3A3B074D-72D6-4BBB-8CF8-83D3CFC0030EgetBytes_des|text=|trigger=button}{sub-section}{sub-section:3A3B074D-72D6-4BBB-8CF8-83D3CFC0030E_desgetBytes_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getBytes_snc|text=|trigger=button}{sub-section}{sub-section:getBytes_snc|trigger=none|class=sIndent} Replace with descriptionversion info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:3A3B074D-72D6-4BBB-8CF8-83D3CFC0030EgetBytes_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3A3B074D-72D6-4BBB-8CF8-83D3CFC0030EgetBytes_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:3A3B074D-72D6-4BBB-8CF8-83D3CFC0030EgetBytes_ret|text=|trigger=button}{sub-section}{sub-section:3A3B074D-72D6-4BBB-8CF8-83D3CFC0030EgetBytes_ret|trigger=none|class=sIndent}byte[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:3A3B074D-72D6-4BBB-8CF8-83D3CFC0030EgetBytes_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3A3B074D-72D6-4BBB-8CF8-83D3CFC0030EgetBytes_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3A3B074D-72D6-4BBB-8CF8-83D3CFC0030E_seegetBytes_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3A3B074D-72D6-4BBB-8CF8-83D3CFC0030EgetBytes_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:3A3B074D-72D6-4BBB-8CF8-83D3CFC0030EgetBytes_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3A3B074D-72D6-4BBB-8CF8-83D3CFC0030EgetBytes_sam|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=0947BA4F-5F98-4CF2-B61C-9F84A3E2E503getContentType|class=node}{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:0947BA4F-5F98-4CF2-B61C-9F84A3E2E503getContentType_des|text=|trigger=button}{sub-section}{sub-section:0947BA4F-5F98-4CF2-B61C-9F84A3E2E503getContentType_des|trigger=none|class=sIndent}Returns the contenttype of this file, like for example 'application/pdf' \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:0947BA4F-5F98-4CF2-B61C-9F84A3E2E503_prsgetContentType_snc|text=|trigger=button}{sub-section}{div:sub-section:getContentType_snc|trigger=none|class=sIndent} Replace with version info{sub-section:0947BA4F-5F98-4CF2-B61C-9F84A3E2E503_prs|trigger=none}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getContentType_prs|text=|trigger=button}{sub-section}{sub-section:getContentType_prs|trigger=none|class=sIndent}{divsub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:0947BA4F-5F98-4CF2-B61C-9F84A3E2E503getContentType_ret|text=|trigger=button}{sub-section}{sub-section:0947BA4F-5F98-4CF2-B61C-9F84A3E2E503getContentType_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:0947BA4F-5F98-4CF2-B61C-9F84A3E2E503getContentType_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0947BA4F-5F98-4CF2-B61C-9F84A3E2E503getContentType_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0947BA4F-5F98-4CF2-B61C-9F84A3E2E503_seegetContentType_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0947BA4F-5F98-4CF2-B61C-9F84A3E2E503getContentType_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:0947BA4F-5F98-4CF2-B61C-9F84A3E2E503getContentType_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0947BA4F-5F98-4CF2-B61C-9F84A3E2E503getContentType_sam|class=sIndent|trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('./big.jpg');
// or for a remote file:
// var f = plugins.convertToRemoteJSFile('/images/big.jpg');
if (f && 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AF958D2E-0E91-4F20-A55A-88ACDDA2F134getName|class=node}{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:AF958D2E-0E91-4F20-A55A-88ACDDA2F134getName_des|text=|trigger=button}{sub-section}{sub-section:AF958D2E-0E91-4F20-A55A-88ACDDA2F134getName_des|trigger=none|class=sIndent}Returns the name of the file. The name consists in the last part of the file path \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:AF958D2E-0E91-4F20-A55A-88ACDDA2F134_prsgetName_snc|text=|trigger=button}{sub-section}{div:sub-section:getName_snc|trigger=none|class=sIndent} Replace with version info{sub-section:AF958D2E-0E91-4F20-A55A-88ACDDA2F134_prs|trigger=none}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getName_prs|text=|trigger=button}{sub-section}{sub-section:getName_prs|trigger=none|class=sIndent}{divsub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:AF958D2E-0E91-4F20-A55A-88ACDDA2F134getName_ret|text=|trigger=button}{sub-section}{sub-section:AF958D2E-0E91-4F20-A55A-88ACDDA2F134getName_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AF958D2E-0E91-4F20-A55A-88ACDDA2F134getName_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AF958D2E-0E91-4F20-A55A-88ACDDA2F134getName_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AF958D2E-0E91-4F20-A55A-88ACDDA2F134_seegetName_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AF958D2E-0E91-4F20-A55A-88ACDDA2F134getName_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AF958D2E-0E91-4F20-A55A-88ACDDA2F134getName_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AF958D2E-0E91-4F20-A55A-88ACDDA2F134getName_sam|class=sIndent|trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('./big.jpg');
// or for a remote file:
// var f = plugins.convertToRemoteJSFile('/images/big.jpg');
if (f && 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=895DAB66-A03B-4025-875C-FFF1A7D5380FgetParent|class=node}{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:895DAB66-A03B-4025-875C-FFF1A7D5380FgetParent_des|text=|trigger=button}{sub-section}{sub-section:895DAB66-A03B-4025-875C-FFF1A7D5380FgetParent_des|trigger=none|class=sIndent}Returns the String representation of the path of the parent of this file \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:895DAB66-A03B-4025-875C-FFF1A7D5380F_prsgetParent_snc|text=|trigger=button}{sub-section}{div:sub-section:getParent_snc|trigger=none|class=sIndent} Replace with version info{sub-section:895DAB66-A03B-4025-875C-FFF1A7D5380F_prs|trigger=none}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getParent_prs|text=|trigger=button}{sub-section}{sub-section:getParent_prs|trigger=none|class=sIndent}{divsub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:895DAB66-A03B-4025-875C-FFF1A7D5380FgetParent_ret|text=|trigger=button}{sub-section}{sub-section:895DAB66-A03B-4025-875C-FFF1A7D5380FgetParent_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:895DAB66-A03B-4025-875C-FFF1A7D5380FgetParent_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:895DAB66-A03B-4025-875C-FFF1A7D5380FgetParent_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:895DAB66-A03B-4025-875C-FFF1A7D5380F_seegetParent_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:895DAB66-A03B-4025-875C-FFF1A7D5380FgetParent_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:895DAB66-A03B-4025-875C-FFF1A7D5380FgetParent_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:895DAB66-A03B-4025-875C-FFF1A7D5380FgetParent_sam|class=sIndent|trigger=none}{code:language=javascript}}
var f = plugins.file.convertToJSFile('story.txt');
// or for a remote file:
// var f = plugins.file.convertToJSFileconvertToRemoteJSFile('/story.txt');
application.output('parent folder: ' + f.getAbsoluteFile().getParent());
application.output('parent folder has ' + f.getAbsoluteFile().getParentFile().listFiles().length + ' entries');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=6F6DD604-0D05-4FCA-B085-8D37F07EA214getParentFile|class=node}{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:6F6DD604-0D05-4FCA-B085-8D37F07EA214getParentFile_des|text=|trigger=button}{sub-section}{sub-section:6F6DD604-0D05-4FCA-B085-8D37F07EA214getParentFile_des|trigger=none|class=sIndent}Returns a JSFile instance that corresponds to the parent of this file \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:6F6DD604-0D05-4FCA-B085-8D37F07EA214_prsgetParentFile_snc|text=|trigger=button}{sub-section}{div:sub-section:getParentFile_snc|trigger=none|class=sIndent} Replace with version info{sub-section:6F6DD604-0D05-4FCA-B085-8D37F07EA214}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getParentFile_prs|text=|trigger=button}{sub-section}{sub-section:getParentFile_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:6F6DD604-0D05-4FCA-B085-8D37F07EA214getParentFile_ret|text=|trigger=button}{sub-section}{sub-section:6F6DD604-0D05-4FCA-B085-8D37F07EA214getParentFile_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:6F6DD604-0D05-4FCA-B085-8D37F07EA214getParentFile_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:6F6DD604-0D05-4FCA-B085-8D37F07EA214getParentFile_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:6F6DD604-0D05-4FCA-B085-8D37F07EA214_seegetParentFile_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:6F6DD604-0D05-4FCA-B085-8D37F07EA214getParentFile_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:6F6DD604-0D05-4FCA-B085-8D37F07EA214getParentFile_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:6F6DD604-0D05-4FCA-B085-8D37F07EA214getParentFile_sam|class=sIndent|trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('story.txt');
// or for a remote file:
// var f = plugins.file.convertToJSFileconvertToRemoteJSFile('/story.txt');
application.output('parent folder: ' + f.getAbsoluteFile().getParent());
application.output('parent folder has ' + f.getAbsoluteFile().getParentFile().listFiles().length + ' entries');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=01F0D937-F95E-4D92-A568-47B9C3A2B66FgetPath|class=node}{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:01F0D937-F95E-4D92-A568-47B9C3A2B66FgetPath_des|text=|trigger=button}{sub-section}{sub-section:01F0D937-F95E-4D92-A568-47B9C3A2B66FgetPath_des|trigger=none|class=sIndent}Returns a String holding the path to the file \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:01F0D937-F95E-4D92-A568-47B9C3A2B66F_prsgetPath_snc|text=|trigger=button}{sub-section}{div:sub-section:getPath_snc|trigger=none|class=sIndent} Replace with version info{sub-section:01F0D937-F95E-4D92-A568-47B9C3A2B66F_prs|trigger=none}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getPath_prs|text=|trigger=button}{sub-section}{sub-section:getPath_prs|trigger=none|class=sIndent}{divsub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:01F0D937-F95E-4D92-A568-47B9C3A2B66FgetPath_ret|text=|trigger=button}{sub-section}{sub-section:01F0D937-F95E-4D92-A568-47B9C3A2B66FgetPath_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:01F0D937-F95E-4D92-A568-47B9C3A2B66FgetPath_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:01F0D937-F95E-4D92-A568-47B9C3A2B66FgetPath_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:01F0D937-F95E-4D92-A568-47B9C3A2B66F_seegetPath_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:01F0D937-F95E-4D92-A568-47B9C3A2B66FgetPath_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:01F0D937-F95E-4D92-A568-47B9C3A2B66FgetPath_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:01F0D937-F95E-4D92-A568-47B9C3A2B66FgetPath_sam|class=sIndent|trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('./big.jpg');
// or for a remote file:
// var f = plugins.convertToRemoteJSFile('/images/big.jpg');
if (f && 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=A9E52C75-F0F4-4553-B1C9-6F85974FC2F0isAbsolute|class=node}{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:A9E52C75-F0F4-4553-B1C9-6F85974FC2F0isAbsolute_des|text=|trigger=button}{sub-section}{sub-section:A9E52C75-F0F4-4553-B1C9-6F85974FC2F0isAbsolute_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 \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:A9E52C75-F0F4-4553-B1C9-6F85974FC2F0_prsisAbsolute_snc|text=|trigger=button}{sub-section}{div:sub-section:isAbsolute_snc|trigger=none|class=sIndent} Replace with version info{sub-section:A9E52C75-F0F4-4553-B1C9-6F85974FC2F0}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:isAbsolute_prs|text=|trigger=button}{sub-section}{sub-section:isAbsolute_prs|trigger=nonenone|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A9E52C75-F0F4-4553-B1C9-6F85974FC2F0isAbsolute_ret|text=|trigger=button}{sub-section}{sub-section:A9E52C75-F0F4-4553-B1C9-6F85974FC2F0isAbsolute_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A9E52C75-F0F4-4553-B1C9-6F85974FC2F0isAbsolute_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A9E52C75-F0F4-4553-B1C9-6F85974FC2F0isAbsolute_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A9E52C75-F0F4-4553-B1C9-6F85974FC2F0_seeisAbsolute_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A9E52C75-F0F4-4553-B1C9-6F85974FC2F0isAbsolute_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A9E52C75-F0F4-4553-B1C9-6F85974FC2F0isAbsolute_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A9E52C75-F0F4-4553-B1C9-6F85974FC2F0isAbsolute_sam|class=sIndent|trigger=none}{code:language=javascript}trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('./big.jpg');
// or for a remote file:
// var f = plugins.file.convertToJSFileconvertToRemoteJSFile('./images/big.jpg');
if (f && 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=89021AC8-72E1-4A69-AEDD-95B39FFC4583isDirectory|class=node}{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; font-weight: bold;}isDirectory{span}{span:id=iets|style=float: left;}\(){span;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:isDirectory_des|text=|trigger=button}{sub-section}{sub-section:isDirectory_des|trigger=none|class=sIndent}Returns true if the file is a directory \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=dessnc}{td}*Since*\\{sub-section:89021AC8-72E1-4A69-AEDD-95B39FFC4583_desisDirectory_snc|text=|trigger=button}{sub-section}{sub-section:89021AC8-72E1-4A69-AEDD-95B39FFC4583_desisDirectory_snc|trigger=none|class=sIndent}Returns trueReplace ifwith the file is a directory.version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:89021AC8-72E1-4A69-AEDD-95B39FFC4583isDirectory_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:89021AC8-72E1-4A69-AEDD-95B39FFC4583isDirectory_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:89021AC8-72E1-4A69-AEDD-95B39FFC4583isDirectory_ret|text=|trigger=button}{sub-section}{sub-section:89021AC8-72E1-4A69-AEDD-95B39FFC4583isDirectory_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:89021AC8-72E1-4A69-AEDD-95B39FFC4583isDirectory_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:89021AC8-72E1-4A69-AEDD-95B39FFC4583isDirectory_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:89021AC8-72E1-4A69-AEDD-95B39FFC4583_seeisDirectory_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:89021AC8-72E1-4A69-AEDD-95B39FFC4583isDirectory_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:89021AC8-72E1-4A69-AEDD-95B39FFC4583isDirectory_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:89021AC8-72E1-4A69-AEDD-95B39FFC4583isDirectory_sam|class=sIndent|trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('./big.jpg');
// or for a remote file:
// var f = plugins.convertToRemoteJSFile('/images/big.jpg');
if (f && 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F2D44AFD-7DC3-4538-9E54-5957C4D7571B=isFile|class=node}{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:F2D44AFD-7DC3-4538-9E54-5957C4D7571Bsub-section:isFile_des|text=|trigger=button}{sub-section}{sub-section:F2D44AFD-7DC3-4538-9E54-5957C4D7571BisFile_des|trigger=none|class=sIndent}Returns true if the file is a file and not a regular file \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:F2D44AFD-7DC3-4538-9E54-5957C4D7571B_prsisFile_snc|text=|trigger=button}{sub-section}{div:sub-section:isFile_snc|trigger=none|class=sIndent} Replace with version info{sub-section:F2D44AFD-7DC3-4538-9E54-5957C4D7571B}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:isFile_prs|text=|trigger=button}{sub-section}{sub-section:isFile_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F2D44AFD-7DC3-4538-9E54-5957C4D7571BisFile_ret|text=|trigger=button}{sub-section}{sub-section:F2D44AFD-7DC3-4538-9E54-5957C4D7571B-section}{sub-section:isFile_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F2D44AFD-7DC3-4538-9E54-5957C4D7571BisFile_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F2D44AFD-7DC3-4538-9E54-5957C4D7571BisFile_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F2D44AFD-7DC3-4538-9E54-5957C4D7571B_seeisFile_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F2D44AFD-7DC3-4538-9E54-5957C4D7571BisFile_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F2D44AFD-7DC3-4538-9E54-5957C4D7571BisFile_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F2D44AFD-7DC3-4538-9E54-5957C4D7571BisFile_sam|class=sIndent|trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('./big.jpg');
// or for a remote file:
// var f = plugins.convertToRemoteJSFile('/images/big.jpg');
if (f && 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=0BBCE9B4-2E64-4710-8256-40F105C22080id=isHidden|class=node}{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:0BBCE9B4-2E64-4710-8256-40F105C22080isHidden_des|text=|trigger=button}{sub-section}{sub-section:0BBCE9B4-2E64-4710-8256-40F105C22080isHidden_des|trigger=none|class=sIndent}Returns true if the file is hidden (a file system attribute) \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:0BBCE9B4-2E64-4710-8256-40F105C22080_prsisHidden_snc|text=|trigger=button}{sub-section}{div:sub-section:isHidden_snc|trigger=none|class=sIndent} Replace with version info{sub-section:0BBCE9B4-2E64-4710-8256-40F105C22080}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:isHidden_prs|text=|trigger=button}{sub-section}{sub-section:isHidden_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:0BBCE9B4-2E64-4710-8256-40F105C22080sub-section:isHidden_ret|text=|trigger=button}{sub-section}{sub-section:0BBCE9B4-2E64-4710-8256-40F105C22080isHidden_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:0BBCE9B4-2E64-4710-8256-40F105C22080isHidden_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0BBCE9B4-2E64-4710-8256-40F105C22080isHidden_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0BBCE9B4-2E64-4710-8256-40F105C22080_seeisHidden_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0BBCE9B4-2E64-4710-8256-40F105C22080isHidden_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:0BBCE9B4-2E64-4710-8256-40F105C22080isHidden_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0BBCE9B4-2E64-4710-8256-40F105C22080isHidden_sam|class=sIndent|trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('./big.jpg');
// or for a remote file:
// var f = plugins.convertToRemoteJSFile('/images/big.jpg');
if (
if (f && 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=78F76411-7E70-437E-BBF6-19E9B306E6DClastModified|class=node}{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:78F76411-7E70-437E-BBF6-19E9B306E6DClastModified_des|text=|trigger=button}{sub-section}{sub-section:78F76411-7E70-437E-BBF6-19E9B306E6DClastModified_des|trigger=none|class=sIndent}Returns the time/date of the last modification on the file \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:78F76411-7E70-437E-BBF6-19E9B306E6DC_prslastModified_snc|text=|trigger=button}{sub-section}{div:sub-section:lastModified_snc|trigger=none|class=sIndent} Replace with version info{sub-section:78F76411-7E70-437E-BBF6-19E9B306E6DC}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:lastModified_prs|text=|trigger=button}{sub-section}{sub-section:lastModified_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:78F76411-7E70-437E-BBF6-19E9B306E6DClastModified_ret|text=|trigger=button}{sub-section}{sub-section:78F76411-7E70-437E-BBF6-19E9B306E6DClastModified_ret|trigger=none|class=sIndent}[Date]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:78F76411-7E70-437E-BBF6-19E9B306E6DClastModified_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:78F76411-7E70-437E-BBF6-19E9B306E6DClastModified_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:78F76411-7E70-437E-BBF6-19E9B306E6DC_seelastModified_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:78F76411-7E70-437E-BBF6-19E9B306E6DClastModified_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:78F76411-7E70-437E-BBF6-19E9B306E6DClastModified_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:78F76411-7E70-437E-BBF6-19E9B306E6DClastModified_sam|class=sIndent|trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('.('./big.jpg');
// or for a remote file:
// var f = plugins.convertToRemoteJSFile('/images/big.jpg');
if (f && 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=FF0E8269-53F9-4019-A500-D6F1B11AD256list|class=node}{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:FF0E8269-53F9-4019-A500-D6F1B11AD256list_des|text=|trigger=button}{sub-section}{sub-section:FF0E8269-53F9-4019-A500-D6F1B11AD256list_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 \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:FF0E8269-53F9-4019-A500-D6F1B11AD256_prslist_snc|text=|trigger=button}{sub-section}{div:sub-section:list_snc|trigger=none|class=sIndent} Replace with version info{sub-section:FF0E8269-53F9-4019-A500-D6F1B11AD256}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:list_prs|text=|trigger=button}{sub-section}{sub-section:list_prs|trigger=none|class=nonesIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:FF0E8269-53F9-4019-A500-D6F1B11AD256list_ret|text=|trigger=button}{sub-section}{sub-section:FF0E8269-53F9-4019-A500-D6F1B11AD256list_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FF0E8269-53F9-4019-A500-D6F1B11AD256list_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FF0E8269-53F9-4019-A500-D6F1B11AD256list_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FF0E8269-53F9-4019-A500-D6F1B11AD256_seelist_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FF0E8269-53F9-4019-A500-D6F1B11AD256list_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FF0E8269-53F9-4019-A500-D6F1B11AD256list_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FF0E8269-53F9-4019-A500-D6F1B11AD256list_sam|class=sIndent|trigger=none}{code:language=javascript}
var d = plugins.file.convertToJSFile('plugins');
// or for a remote file:
// var d = plugins.file.convertToJSFileconvertToRemoteJSFile('/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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=4AAD8232-A67C-4D82-926D-AD30A2855C91listFiles|class=node}{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:4AAD8232-A67C-4D82-926D-AD30A2855C91listFiles_des|text=|trigger=button}{sub-section}{sub-section:4AAD8232-A67C-4D82-926D-AD30A2855C91listFiles_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 \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:4AAD8232-A67C-4D82-926D-AD30A2855C91_prslistFiles_snc|text=|trigger=button}{sub-section}{div:sub-section:listFiles_snc|trigger=none|class=sIndent} Replace with version info{sub-section:4AAD8232-A67C-4D82-926D-AD30A2855C91}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:listFiles_prs|text=|trigger=button}{sub-section}{sub-section:listFiles_prs|trigger=nonenone|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:4AAD8232-A67C-4D82-926D-AD30A2855C91listFiles_ret|text=|trigger=button}{sub-section}{sub-section:4AAD8232-A67C-4D82-926D-AD30A2855C91listFiles_ret|trigger=none|class=sIndent}[JSFile]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4AAD8232-A67C-4D82-926D-AD30A2855C91listFiles_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4AAD8232-A67C-4D82-926D-AD30A2855C91listFiles_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4AAD8232-A67C-4D82-926D-AD30A2855C91_seelistFiles_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4AAD8232-A67C-4D82-926D-AD30A2855C91listFiles_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4AAD8232-A67C-4D82-926D-AD30A2855C91listFiles_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4AAD8232-A67C-4D82-926D-AD30A2855C91listFiles_sam|class=sIndent|trigger=none}{code:language=javascript}}{code:language=javascript}
var d = plugins.file.convertToJSFile('plugins');
// or for a remote file:
// var d = plugins.file.convertToJSFileconvertToRemoteJSFile('/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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=4EC4A82A-91AD-4088-9285-82E2CB526D40mkdir|class=node}{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:4EC4A82A-91AD-4088-9285-82E2CB526D40mkdir_des|text=|trigger=button}{sub-section}{sub-section:4EC4A82A-91AD-4088-9285-82E2CB526D40mkdir_des|trigger=none|class=sIndent}Creates a directory on disk if possible. Returns true if a new directory was created. if a new directory was created \- for remote, use the streamFilesToServer to create the directory instead.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:mkdir_snc|text=|trigger=button}{sub-section}{sub-section:mkdir_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:4EC4A82A-91AD-4088-9285-82E2CB526D40mkdir_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4EC4A82A-91AD-4088-9285-82E2CB526D40mkdir_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:4EC4A82A-91AD-4088-9285-82E2CB526D40mkdir_ret|text=|trigger=button}{sub-section}{sub-section:4EC4A82A-91AD-4088-9285-82E2CB526D40mkdir_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4EC4A82A-91AD-4088-9285-82E2CB526D40mkdir_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4EC4A82A-91AD-4088-9285-82E2CB526D40mkdir_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4EC4A82A-91AD-4088-9285-82E2CB526D40_seemkdir_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4EC4A82A-91AD-4088-9285-82E2CB526D40mkdir_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4EC4A82A-91AD-4088-9285-82E2CB526D40mkdir_sam|text=|trigger=button}{sub-section-section}{div:class=sIndent}{sub-section:4EC4A82A-91AD-4088-9285-82E2CB526D40mkdir_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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=C618F5BB-D16D-48C0-8DE2-CED81FA339D8mkdirs|class=node}{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:C618F5BB-D16D-48C0-8DE2-CED81FA339D8mkdirs_des|text=|trigger=button}{sub-section}{sub-section:C618F5BB-D16D-48C0-8DE2-CED81FA339D8mkdirs_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. directories is created \- for remote, use the streamFilesToServer to create the directories instead.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:mkdirs_snc|text=|trigger=button}{sub-section}{sub-section:mkdirs_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:C618F5BB-D16D-48C0-8DE2-CED81FA339D8mkdirs_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C618F5BB-D16D-48C0-8DE2-CED81FA339D8mkdirs_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C618F5BB-D16D-48C0-8DE2-CED81FA339D8mkdirs_ret|text=|trigger=button}{sub-section}{sub-section:C618F5BB-D16D-48C0-8DE2-CED81FA339D8mkdirs_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C618F5BB-D16D-48C0-8DE2-CED81FA339D8mkdirs_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C618F5BB-D16D-48C0-8DE2-CED81FA339D8mkdirs_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C618F5BB-D16D-48C0-8DE2-CED81FA339D8_seemkdirs_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C618F5BB-D16D-48C0-8DE2-CED81FA339D8mkdirs_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C618F5BB-D16D-48C0-8DE2-CED81FA339D8mkdirs_sam|text=|trigger=button}{sub-section}{sub-section:C618F5BB-D16D-48C0-8DE2-CED81FA339D8div:class=sIndent}{sub-section:mkdirs_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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=3D6CFA2F-7779-4D8E-8680-CFB5CAFB320C=renameTo|class=node}{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:3D6CFA2F-7779-4D8E-8680-CFB5CAFB320CrenameTo_des|text=|trigger=button}{sub-section}{sub-section:3D6CFA2F-7779-4D8E-8680-CFB5CAFB320CrenameTo_des|trigger=none|class=sIndent}Renames the file to a different name. Returns true if the file could be renamed \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:3D6CFA2F-7779-4D8E-8680-CFB5CAFB320C_prsrenameTo_snc|text=|trigger=button}{sub-section}{div:sub-section:renameTo_snc|trigger=none|class=sIndent} Replace with version info{sub-section:3D6CFA2F-7779-4D8E-8680-CFB5CAFB320C}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:renameTo_prs|text=|trigger=button}{sub-section}{sub-section:renameTo_prs|trigger=none|class=sIndent}destination
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:3D6CFA2F-7779-4D8E-8680-CFB5CAFB320CrenameTo_ret|text=|trigger=button}{sub-section}{sub-section:3D6CFA2F-7779-4D8E-8680-CFB5CAFB320CrenameTo_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:3D6CFA2F-7779-4D8E-8680-CFB5CAFB320CrenameTo_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3D6CFA2F-7779-4D8E-8680-CFB5CAFB320CrenameTo_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3D6CFA2F-7779-4D8E-8680-CFB5CAFB320C_seerenameTo_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3D6CFA2F-7779-4D8E-8680-CFB5CAFB320CrenameTo_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3D6CFA2F-7779-4D8E-8680-CFB5CAFB320CrenameTo_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3D6CFA2F-7779-4D8E-8680-CFB5CAFB320C_sam|class=sIndent|trigger=none}{code:language=javascript}:renameTo_sam|trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('story.txt');
f.renameTo('otherstory.txt');
// or for a remote file:
// var f = plugins.file.convertToJSFileconvertToRemoteJSFile('/story.txt');
// f.renameTo('/otherstory.txt');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AE9E889B-7C4E-45AA-8D9C-DBC5F75439B9=setLastModified|class=node}{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:AE9E889B-7C4E-45AA-8D9C-DBC5F75439B9_dessetLastModified_des|text=|trigger=button}{sub-section}{sub-section:setLastModified_des|trigger=none|class=sIndent}Sets the date/time of the last modification on the file.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setLastModified_snc|text=|trigger=button}{sub-section}{sub-section:AE9E889B-7C4E-45AA-8D9C-DBC5F75439B9_dessetLastModified_snc|trigger=none|class=sIndent}Sets theReplace date/timewith of the last modification on the file.version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:AE9E889B-7C4E-45AA-8D9C-DBC5F75439B9setLastModified_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AE9E889B-7C4E-45AA-8D9C-DBC5F75439B9setLastModified_prs|trigger=none|class=sIndent}date
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:AE9E889B-7C4E-45AA-8D9C-DBC5F75439B9setLastModified_ret|text=|trigger=button}{sub-section}{sub-section:AE9E889B-7C4E-45AA-8D9C-DBC5F75439B9setLastModified_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AE9E889B-7C4E-45AA-8D9C-DBC5F75439B9setLastModified_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AE9E889B-7C4E-45AA-8D9C-DBC5F75439B9setLastModified_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AE9E889B-7C4E-45AA-8D9C-DBC5F75439B9_seesetLastModified_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AE9E889B-7C4E-45AA-8D9C-DBC5F75439B9setLastModified_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AE9E889B-7C4E-45AA-8D9C-DBC5F75439B9setLastModified_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AE9E889B-7C4E-45AA-8D9C-DBC5F75439B9setLastModified_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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=A4097FD3-F34E-44B8-B271-E1A010D8BCAE=setReadOnly|class=node}{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:A4097FD3-F34E-44B8-B271-E1A010D8BCAEsetReadOnly_des|text=|trigger=button}{sub-section}{sub-section:A4097FD3-F34E-44B8-B271-E1A010D8BCAEsetReadOnly_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=prssnc}{td}*ParametersSince*\\{sub-section:A4097FD3-F34E-44B8-B271-E1A010D8BCAEsetReadOnly_snc|text=|trigger=button}{sub-section}{sub-section:setReadOnly_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:setReadOnly_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A4097FD3-F34E-44B8-B271-E1A010D8BCAEsetReadOnly_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A4097FD3-F34E-44B8-B271-E1A010D8BCAEsetReadOnly_ret|text=|trigger=button}{sub-section}{sub-section:A4097FD3-F34E-44B8-B271-E1A010D8BCAEsetReadOnly_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A4097FD3-F34E-44B8-B271-E1A010D8BCAEsetReadOnly_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A4097FD3-F34E-44B8-B271-E1A010D8BCAEsetReadOnly_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A4097FD3-F34E-44B8-B271-E1A010D8BCAE_seesetReadOnly_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A4097FD3-F34E-44B8-B271-E1A010D8BCAEsetReadOnly_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A4097FD3-F34E-44B8-B271-E1A010D8BCAEsetReadOnly_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A4097FD3-F34E-44B8-B271-E1A010D8BCAEsetReadOnly_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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=8D28F7C6-3423-4AE6-BD0C-93EFE48C1E83=size|class=node}{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:8D28F7C6-3423-4AE6-BD0C-93EFE48C1E83size_des|text=|trigger=button}{sub-section}{sub-section:8D28F7C6-3423-4AE6-BD0C-93EFE48C1E83size_des|trigger=none|class=sIndent}Returns the size in bytes of the file. Returns 0 if the file does not exist on disk \- works on remote files too.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:8D28F7C6-3423-4AE6-BD0C-93EFE48C1E83_prssize_snc|text=|trigger=button}{sub-section}{div:sub-section:size_snc|trigger=none|class=sIndent} Replace with version info{sub-section:8D28F7C6-3423-4AE6-BD0C-93EFE48C1E83}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:size_prs|text=|trigger=button}{sub-section}{sub-section:size_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:8D28F7C6-3423-4AE6-BD0C-93EFE48C1E83-section:size_ret|text=|trigger=button}{sub-section}{sub-section:8D28F7C6-3423-4AE6-BD0C-93EFE48C1E83size_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8D28F7C6-3423-4AE6-BD0C-93EFE48C1E83size_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8D28F7C6-3423-4AE6-BD0C-93EFE48C1E83size_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8D28F7C6-3423-4AE6-BD0C-93EFE48C1E83_seesize_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8D28F7C6-3423-4AE6-BD0C-93EFE48C1E83size_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8D28F7C6-3423-4AE6-BD0C-93EFE48C1E83size_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8D28F7C6-3423-4AE6-BD0C-93EFE48C1E83size_sam|class=sIndent|trigger=none}{code:language=javascript}
var f = plugins.file.convertToJSFile('./big.jpg');
// or for a remote file:
// var f = plugins.convertToRemoteJSFile('/images/big.jpg');
if (f && 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}