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: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}[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]\()
Returns true if the file is a directory.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isFile]\()
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=5EF0204610C914B8-806FE7F7-46B94FA0-BBAE84DD-99268EBCF0818434677B7160}{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:5EF0204610C914B8-806FE7F7-46B94FA0-BBAE84DD-99268EBCF0818434677B7160_des|text=|trigger=button}{sub-section}{sub-section:5EF0204610C914B8-806FE7F7-46B94FA0-BBAE84DD-99268EBCF0818434677B7160_des|trigger=none|class=sIndent}Returns true if the file exists and is readable (has access to it).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:5EF0204610C914B8-806FE7F7-46B94FA0-BBAE84DD-99268EBCF0818434677B7160_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5EF0204610C914B8-806FE7F7-46B94FA0-BBAE84DD-99268EBCF0818434677B7160_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:5EF0204610C914B8-806FE7F7-46B94FA0-BBAE84DD-99268EBCF0818434677B7160_ret|text=|trigger=button}{sub-section}{sub-section:5EF0204610C914B8-806FE7F7-46B94FA0-BBAE84DD-99268EBCF0818434677B7160_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5EF0204610C914B8-806FE7F7-46B94FA0-BBAE84DD-99268EBCF0818434677B7160_see|text=|trigger=button}{sub-section}{sub-section:5EF0204610C914B8-806FE7F7-46B94FA0-BBAE84DD-99268EBCF0818434677B7160_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5EF0204610C914B8-806FE7F7-46B94FA0-BBAE84DD-99268EBCF0818434677B7160_see|text=|trigger=button}{sub-section}{sub-section:5EF0204610C914B8-806FE7F7-46B94FA0-BBAE84DD-99268EBCF0818434677B7160_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5EF0204610C914B8-806FE7F7-46B94FA0-BBAE84DD-99268EBCF0818434677B7160_sam|text=|trigger=button}{sub-section}{sub-section:5EF0204610C914B8-806FE7F7-46B94FA0-BBAE84DD-99268EBCF0818434677B7160_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=362F31A91563A33D-D325FD4F-418040D0-A22AAFEA-E3C466CFC886EAED2FD07EA0}{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:362F31A91563A33D-D325FD4F-418040D0-A22AAFEA-E3C466CFC886EAED2FD07EA0_des|text=|trigger=button}{sub-section}{sub-section:362F31A91563A33D-D325FD4F-418040D0-A22AAFEA-E3C466CFC886EAED2FD07EA0_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:362F31A91563A33D-D325FD4F-418040D0-A22AAFEA-E3C466CFC886EAED2FD07EA0_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:362F31A91563A33D-D325FD4F-418040D0-A22AAFEA-E3C466CFC886EAED2FD07EA0_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:362F31A91563A33D-D325FD4F-418040D0-A22AAFEA-E3C466CFC886EAED2FD07EA0_ret|text=|trigger=button}{sub-section}{sub-section:362F31A91563A33D-D325FD4F-418040D0-A22AAFEA-E3C466CFC886EAED2FD07EA0_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:362F31A91563A33D-D325FD4F-418040D0-A22AAFEA-E3C466CFC886EAED2FD07EA0_see|text=|trigger=button}{sub-section}{sub-section:362F31A91563A33D-D325FD4F-418040D0-A22AAFEA-E3C466CFC886EAED2FD07EA0_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:362F31A91563A33D-D325FD4F-418040D0-A22AAFEA-E3C466CFC886EAED2FD07EA0_see|text=|trigger=button}{sub-section}{sub-section:362F31A91563A33D-D325FD4F-418040D0-A22AAFEA-E3C466CFC886EAED2FD07EA0_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:362F31A91563A33D-D325FD4F-418040D0-A22AAFEA-E3C466CFC886EAED2FD07EA0_sam|text=|trigger=button}{sub-section}{sub-section:362F31A91563A33D-D325FD4F-418040D0-A22AAFEA-E3C466CFC886EAED2FD07EA0_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=64BC83515764434E-D75BE027-461C43F3-B0A098D6-2E67EDD2D8CF5DE750DEBCC7}{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:64BC83515764434E-D75BE027-461C43F3-B0A098D6-2E67EDD2D8CF5DE750DEBCC7_des|text=|trigger=button}{sub-section}{sub-section:64BC83515764434E-D75BE027-461C43F3-B0A098D6-2E67EDD2D8CF5DE750DEBCC7_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:64BC83515764434E-D75BE027-461C43F3-B0A098D6-2E67EDD2D8CF5DE750DEBCC7_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:64BC83515764434E-D75BE027-461C43F3-B0A098D6-2E67EDD2D8CF5DE750DEBCC7_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:64BC83515764434E-D75BE027-461C43F3-B0A098D6-2E67EDD2D8CF5DE750DEBCC7_ret|text=|trigger=button}{sub-section}{sub-section:64BC83515764434E-D75BE027-461C43F3-B0A098D6-2E67EDD2D8CF5DE750DEBCC7_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:64BC83515764434E-D75BE027-461C43F3-B0A098D6-2E67EDD2D8CF5DE750DEBCC7_see|text=|trigger=button}{sub-section}{sub-section:64BC83515764434E-D75BE027-461C43F3-B0A098D6-2E67EDD2D8CF5DE750DEBCC7_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:64BC83515764434E-D75BE027-461C43F3-B0A098D6-2E67EDD2D8CF5DE750DEBCC7_see|text=|trigger=button}{sub-section}{sub-section:64BC83515764434E-D75BE027-461C43F3-B0A098D6-2E67EDD2D8CF5DE750DEBCC7_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:64BC83515764434E-D75BE027-461C43F3-B0A098D6-2E67EDD2D8CF5DE750DEBCC7_sam|text=|trigger=button}{sub-section}{sub-section:64BC83515764434E-D75BE027-461C43F3-B0A098D6-2E67EDD2D8CF5DE750DEBCC7_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=A0F1F47C255EAC07-613659B4-4FE24686-858A8AA1-AE1275FCE51B5ADE02CA73E2}{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:A0F1F47C255EAC07-613659B4-4FE24686-858A8AA1-AE1275FCE51B5ADE02CA73E2_des|text=|trigger=button}{sub-section}{sub-section:A0F1F47C255EAC07-613659B4-4FE24686-858A8AA1-AE1275FCE51B5ADE02CA73E2_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:A0F1F47C255EAC07-613659B4-4FE24686-858A8AA1-AE1275FCE51B5ADE02CA73E2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A0F1F47C255EAC07-613659B4-4FE24686-858A8AA1-AE1275FCE51B5ADE02CA73E2_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A0F1F47C255EAC07-613659B4-4FE24686-858A8AA1-AE1275FCE51B5ADE02CA73E2_ret|text=|trigger=button}{sub-section}{sub-section:A0F1F47C255EAC07-613659B4-4FE24686-858A8AA1-AE1275FCE51B5ADE02CA73E2_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A0F1F47C255EAC07-613659B4-4FE24686-858A8AA1-AE1275FCE51B5ADE02CA73E2_see|text=|trigger=button}{sub-section}{sub-section:A0F1F47C255EAC07-613659B4-4FE24686-858A8AA1-AE1275FCE51B5ADE02CA73E2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A0F1F47C255EAC07-613659B4-4FE24686-858A8AA1-AE1275FCE51B5ADE02CA73E2_see|text=|trigger=button}{sub-section}{sub-section:A0F1F47C255EAC07-613659B4-4FE24686-858A8AA1-AE1275FCE51B5ADE02CA73E2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A0F1F47C255EAC07-613659B4-4FE24686-858A8AA1-AE1275FCE51B5ADE02CA73E2_sam|text=|trigger=button}{sub-section}{sub-section:A0F1F47C255EAC07-613659B4-4FE24686-858A8AA1-AE1275FCE51B5ADE02CA73E2_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=1025F4A14C7331D7-562D1876-48CD4CEF-A57EA710-0A0E256D335C5BF79B537452}{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:1025F4A14C7331D7-562D1876-48CD4CEF-A57EA710-0A0E256D335C5BF79B537452_des|text=|trigger=button}{sub-section}{sub-section:1025F4A14C7331D7-562D1876-48CD4CEF-A57EA710-0A0E256D335C5BF79B537452_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:1025F4A14C7331D7-562D1876-48CD4CEF-A57EA710-0A0E256D335C5BF79B537452_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1025F4A14C7331D7-562D1876-48CD4CEF-A57EA710-0A0E256D335C5BF79B537452_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:1025F4A14C7331D7-562D1876-48CD4CEF-A57EA710-0A0E256D335C5BF79B537452_ret|text=|trigger=button}{sub-section}{sub-section:1025F4A14C7331D7-562D1876-48CD4CEF-A57EA710-0A0E256D335C5BF79B537452_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1025F4A14C7331D7-562D1876-48CD4CEF-A57EA710-0A0E256D335C5BF79B537452_see|text=|trigger=button}{sub-section}{sub-section:1025F4A14C7331D7-562D1876-48CD4CEF-A57EA710-0A0E256D335C5BF79B537452_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1025F4A14C7331D7-562D1876-48CD4CEF-A57EA710-0A0E256D335C5BF79B537452_see|text=|trigger=button}{sub-section}{sub-section:1025F4A14C7331D7-562D1876-48CD4CEF-A57EA710-0A0E256D335C5BF79B537452_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1025F4A14C7331D7-562D1876-48CD4CEF-A57EA710-0A0E256D335C5BF79B537452_sam|text=|trigger=button}{sub-section}{sub-section:1025F4A14C7331D7-562D1876-48CD4CEF-A57EA710-0A0E256D335C5BF79B537452_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=FECDBA7BA3AD3587-FC148EE4-4BDE4BE5-ADDA8356-327CB3244A8B745783B1B836}{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:FECDBA7BA3AD3587-FC148EE4-4BDE4BE5-ADDA8356-327CB3244A8B745783B1B836_des|text=|trigger=button}{sub-section}{sub-section:FECDBA7BA3AD3587-FC148EE4-4BDE4BE5-ADDA8356-327CB3244A8B745783B1B836_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:FECDBA7BA3AD3587-FC148EE4-4BDE4BE5-ADDA8356-327CB3244A8B745783B1B836_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FECDBA7BA3AD3587-FC148EE4-4BDE4BE5-ADDA8356-327CB3244A8B745783B1B836_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:FECDBA7BA3AD3587-FC148EE4-4BDE4BE5-ADDA8356-327CB3244A8B745783B1B836_ret|text=|trigger=button}{sub-section}{sub-section:FECDBA7BA3AD3587-FC148EE4-4BDE4BE5-ADDA8356-327CB3244A8B745783B1B836_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FECDBA7BA3AD3587-FC148EE4-4BDE4BE5-ADDA8356-327CB3244A8B745783B1B836_see|text=|trigger=button}{sub-section}{sub-section:FECDBA7BA3AD3587-FC148EE4-4BDE4BE5-ADDA8356-327CB3244A8B745783B1B836_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FECDBA7BA3AD3587-FC148EE4-4BDE4BE5-ADDA8356-327CB3244A8B745783B1B836_see|text=|trigger=button}{sub-section}{sub-section:FECDBA7BA3AD3587-FC148EE4-4BDE4BE5-ADDA8356-327CB3244A8B745783B1B836_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FECDBA7BA3AD3587-FC148EE4-4BDE4BE5-ADDA8356-327CB3244A8B745783B1B836_sam|text=|trigger=button}{sub-section}{sub-section:FECDBA7BA3AD3587-FC148EE4-4BDE4BE5-ADDA8356-327CB3244A8B745783B1B836_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=A15D5379EA540009-868B48AB-46274B80-99EE9EE9-2A2391297763FCE85E586CEA}{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:A15D5379EA540009-868B48AB-46274B80-99EE9EE9-2A2391297763FCE85E586CEA_des|text=|trigger=button}{sub-section}{sub-section:A15D5379EA540009-868B48AB-46274B80-99EE9EE9-2A2391297763FCE85E586CEA_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:A15D5379EA540009-868B48AB-46274B80-99EE9EE9-2A2391297763FCE85E586CEA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A15D5379EA540009-868B48AB-46274B80-99EE9EE9-2A2391297763FCE85E586CEA_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A15D5379EA540009-868B48AB-46274B80-99EE9EE9-2A2391297763FCE85E586CEA_ret|text=|trigger=button}{sub-section}{sub-section:A15D5379EA540009-868B48AB-46274B80-99EE9EE9-2A2391297763FCE85E586CEA_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A15D5379EA540009-868B48AB-46274B80-99EE9EE9-2A2391297763FCE85E586CEA_see|text=|trigger=button}{sub-section}{sub-section:A15D5379EA540009-868B48AB-46274B80-99EE9EE9-2A2391297763FCE85E586CEA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A15D5379EA540009-868B48AB-46274B80-99EE9EE9-2A2391297763FCE85E586CEA_see|text=|trigger=button}{sub-section}{sub-section:A15D5379EA540009-868B48AB-46274B80-99EE9EE9-2A2391297763FCE85E586CEA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A15D5379EA540009-868B48AB-46274B80-99EE9EE9-2A2391297763FCE85E586CEA_sam|text=|trigger=button}{sub-section}{sub-section:A15D5379EA540009-868B48AB-46274B80-99EE9EE9-2A2391297763FCE85E586CEA_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=D23EB6FE33561C6F-315BAB6E-474745DA-A726885D-18A25AE423236DE9401C23DA}{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:D23EB6FE33561C6F-315BAB6E-474745DA-A726885D-18A25AE423236DE9401C23DA_des|text=|trigger=button}{sub-section}{sub-section:D23EB6FE33561C6F-315BAB6E-474745DA-A726885D-18A25AE423236DE9401C23DA_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:D23EB6FE33561C6F-315BAB6E-474745DA-A726885D-18A25AE423236DE9401C23DA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D23EB6FE33561C6F-315BAB6E-474745DA-A726885D-18A25AE423236DE9401C23DA_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D23EB6FE33561C6F-315BAB6E-474745DA-A726885D-18A25AE423236DE9401C23DA_ret|text=|trigger=button}{sub-section}{sub-section:D23EB6FE33561C6F-315BAB6E-474745DA-A726885D-18A25AE423236DE9401C23DA_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D23EB6FE33561C6F-315BAB6E-474745DA-A726885D-18A25AE423236DE9401C23DA_see|text=|trigger=button}{sub-section}{sub-section:D23EB6FE33561C6F-315BAB6E-474745DA-A726885D-18A25AE423236DE9401C23DA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D23EB6FE33561C6F-315BAB6E-474745DA-A726885D-18A25AE423236DE9401C23DA_see|text=|trigger=button}{sub-section}{sub-section:D23EB6FE33561C6F-315BAB6E-474745DA-A726885D-18A25AE423236DE9401C23DA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D23EB6FE33561C6F-315BAB6E-474745DA-A726885D-18A25AE423236DE9401C23DA_sam|text=|trigger=button}{sub-section}{sub-section:D23EB6FE33561C6F-315BAB6E-474745DA-A726885D-18A25AE423236DE9401C23DA_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=B423199BC877D2D3-6014CA36-494A4761-8F5C9B7C-561B71A8D88BCB8B19559401}{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:B423199BC877D2D3-6014CA36-494A4761-8F5C9B7C-561B71A8D88BCB8B19559401_des|text=|trigger=button}{sub-section}{sub-section:B423199BC877D2D3-6014CA36-494A4761-8F5C9B7C-561B71A8D88BCB8B19559401_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:B423199BC877D2D3-6014CA36-494A4761-8F5C9B7C-561B71A8D88BCB8B19559401_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B423199BC877D2D3-6014CA36-494A4761-8F5C9B7C-561B71A8D88BCB8B19559401_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:B423199BC877D2D3-6014CA36-494A4761-8F5C9B7C-561B71A8D88BCB8B19559401_ret|text=|trigger=button}{sub-section}{sub-section:B423199BC877D2D3-6014CA36-494A4761-8F5C9B7C-561B71A8D88BCB8B19559401_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B423199BC877D2D3-6014CA36-494A4761-8F5C9B7C-561B71A8D88BCB8B19559401_see|text=|trigger=button}{sub-section}{sub-section:B423199BC877D2D3-6014CA36-494A4761-8F5C9B7C-561B71A8D88BCB8B19559401_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B423199BC877D2D3-6014CA36-494A4761-8F5C9B7C-561B71A8D88BCB8B19559401_see|text=|trigger=button}{sub-section}{sub-section:B423199BC877D2D3-6014CA36-494A4761-8F5C9B7C-561B71A8D88BCB8B19559401_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B423199BC877D2D3-6014CA36-494A4761-8F5C9B7C-561B71A8D88BCB8B19559401_sam|text=|trigger=button}{sub-section}{sub-section:B423199BC877D2D3-6014CA36-494A4761-8F5C9B7C-561B71A8D88BCB8B19559401_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=765071F2ECD288D3-67957479-4DD94B9F-80229A26-7A2F399F27A18D2698E228CD}{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:765071F2ECD288D3-67957479-4DD94B9F-80229A26-7A2F399F27A18D2698E228CD_des|text=|trigger=button}{sub-section}{sub-section:765071F2ECD288D3-67957479-4DD94B9F-80229A26-7A2F399F27A18D2698E228CD_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:765071F2ECD288D3-67957479-4DD94B9F-80229A26-7A2F399F27A18D2698E228CD_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:765071F2ECD288D3-67957479-4DD94B9F-80229A26-7A2F399F27A18D2698E228CD_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:765071F2ECD288D3-67957479-4DD94B9F-80229A26-7A2F399F27A18D2698E228CD_ret|text=|trigger=button}{sub-section}{sub-section:765071F2ECD288D3-67957479-4DD94B9F-80229A26-7A2F399F27A18D2698E228CD_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:765071F2ECD288D3-67957479-4DD94B9F-80229A26-7A2F399F27A18D2698E228CD_see|text=|trigger=button}{sub-section}{sub-section:765071F2ECD288D3-67957479-4DD94B9F-80229A26-7A2F399F27A18D2698E228CD_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:765071F2ECD288D3-67957479-4DD94B9F-80229A26-7A2F399F27A18D2698E228CD_see|text=|trigger=button}{sub-section}{sub-section:765071F2ECD288D3-67957479-4DD94B9F-80229A26-7A2F399F27A18D2698E228CD_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:765071F2ECD288D3-67957479-4DD94B9F-80229A26-7A2F399F27A18D2698E228CD_sam|text=|trigger=button}{sub-section}{sub-section:765071F2ECD288D3-67957479-4DD94B9F-80229A26-7A2F399F27A18D2698E228CD_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=FEF9C3AFB91DEDDE-E74D1E86-4EAE4D43-84D4AB06-B0A780A5981E510C590688D3}{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:FEF9C3AFB91DEDDE-E74D1E86-4EAE4D43-84D4AB06-B0A780A5981E510C590688D3_des|text=|trigger=button}{sub-section}{sub-section:FEF9C3AFB91DEDDE-E74D1E86-4EAE4D43-84D4AB06-B0A780A5981E510C590688D3_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:FEF9C3AFB91DEDDE-E74D1E86-4EAE4D43-84D4AB06-B0A780A5981E510C590688D3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FEF9C3AFB91DEDDE-E74D1E86-4EAE4D43-84D4AB06-B0A780A5981E510C590688D3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:FEF9C3AFB91DEDDE-E74D1E86-4EAE4D43-84D4AB06-B0A780A5981E510C590688D3_ret|text=|trigger=button}{sub-section}{sub-section:FEF9C3AFB91DEDDE-E74D1E86-4EAE4D43-84D4AB06-B0A780A5981E510C590688D3_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FEF9C3AFB91DEDDE-E74D1E86-4EAE4D43-84D4AB06-B0A780A5981E510C590688D3_see|text=|trigger=button}{sub-section}{sub-section:FEF9C3AFB91DEDDE-E74D1E86-4EAE4D43-84D4AB06-B0A780A5981E510C590688D3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FEF9C3AFB91DEDDE-E74D1E86-4EAE4D43-84D4AB06-B0A780A5981E510C590688D3_see|text=|trigger=button}{sub-section}{sub-section:FEF9C3AFB91DEDDE-E74D1E86-4EAE4D43-84D4AB06-B0A780A5981E510C590688D3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FEF9C3AFB91DEDDE-E74D1E86-4EAE4D43-84D4AB06-B0A780A5981E510C590688D3_sam|text=|trigger=button}{sub-section}{sub-section:FEF9C3AFB91DEDDE-E74D1E86-4EAE4D43-84D4AB06-B0A780A5981E510C590688D3_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=BFD2B93287108F54-95BFE862-48F947CE-A781ABAA-F82C27E3555E8694BB42EEE6}{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:BFD2B93287108F54-95BFE862-48F947CE-A781ABAA-F82C27E3555E8694BB42EEE6_des|text=|trigger=button}{sub-section}{sub-section:BFD2B93287108F54-95BFE862-48F947CE-A781ABAA-F82C27E3555E8694BB42EEE6_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:BFD2B93287108F54-95BFE862-48F947CE-A781ABAA-F82C27E3555E8694BB42EEE6_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BFD2B93287108F54-95BFE862-48F947CE-A781ABAA-F82C27E3555E8694BB42EEE6_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:BFD2B93287108F54-95BFE862-48F947CE-A781ABAA-F82C27E3555E8694BB42EEE6_ret|text=|trigger=button}{sub-section}{sub-section:BFD2B93287108F54-95BFE862-48F947CE-A781ABAA-F82C27E3555E8694BB42EEE6_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BFD2B93287108F54-95BFE862-48F947CE-A781ABAA-F82C27E3555E8694BB42EEE6_see|text=|trigger=button}{sub-section}{sub-section:BFD2B93287108F54-95BFE862-48F947CE-A781ABAA-F82C27E3555E8694BB42EEE6_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BFD2B93287108F54-95BFE862-48F947CE-A781ABAA-F82C27E3555E8694BB42EEE6_see|text=|trigger=button}{sub-section}{sub-section:BFD2B93287108F54-95BFE862-48F947CE-A781ABAA-F82C27E3555E8694BB42EEE6_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BFD2B93287108F54-95BFE862-48F947CE-A781ABAA-F82C27E3555E8694BB42EEE6_sam|text=|trigger=button}{sub-section}{sub-section:BFD2B93287108F54-95BFE862-48F947CE-A781ABAA-F82C27E3555E8694BB42EEE6_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=78C87AEC699B2141-D8AB1F6E-490C407F-8B8C958E-96629F54FB6BA86F1DEF62D3}{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:78C87AEC699B2141-D8AB1F6E-490C407F-8B8C958E-96629F54FB6BA86F1DEF62D3_des|text=|trigger=button}{sub-section}{sub-section:78C87AEC699B2141-D8AB1F6E-490C407F-8B8C958E-96629F54FB6BA86F1DEF62D3_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:78C87AEC699B2141-D8AB1F6E-490C407F-8B8C958E-96629F54FB6BA86F1DEF62D3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:78C87AEC699B2141-D8AB1F6E-490C407F-8B8C958E-96629F54FB6BA86F1DEF62D3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:78C87AEC699B2141-D8AB1F6E-490C407F-8B8C958E-96629F54FB6BA86F1DEF62D3_ret|text=|trigger=button}{sub-section}{sub-section:78C87AEC699B2141-D8AB1F6E-490C407F-8B8C958E-96629F54FB6BA86F1DEF62D3_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:78C87AEC699B2141-D8AB1F6E-490C407F-8B8C958E-96629F54FB6BA86F1DEF62D3_see|text=|trigger=button}{sub-section}{sub-section:78C87AEC699B2141-D8AB1F6E-490C407F-8B8C958E-96629F54FB6BA86F1DEF62D3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:78C87AEC699B2141-D8AB1F6E-490C407F-8B8C958E-96629F54FB6BA86F1DEF62D3_see|text=|trigger=button}{sub-section}{sub-section:78C87AEC699B2141-D8AB1F6E-490C407F-8B8C958E-96629F54FB6BA86F1DEF62D3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:78C87AEC699B2141-D8AB1F6E-490C407F-8B8C958E-96629F54FB6BA86F1DEF62D3_sam|text=|trigger=button}{sub-section}{sub-section:78C87AEC699B2141-D8AB1F6E-490C407F-8B8C958E-96629F54FB6BA86F1DEF62D3_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=597611F7828D53E0-982C1682-46B44BD6-877A9872-28A0D633C6125F2BE5D933B2}{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:597611F7828D53E0-982C1682-46B44BD6-877A9872-28A0D633C6125F2BE5D933B2_des|text=|trigger=button}{sub-section}{sub-section:597611F7828D53E0-982C1682-46B44BD6-877A9872-28A0D633C6125F2BE5D933B2_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:597611F7828D53E0-982C1682-46B44BD6-877A9872-28A0D633C6125F2BE5D933B2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:597611F7828D53E0-982C1682-46B44BD6-877A9872-28A0D633C6125F2BE5D933B2_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:597611F7828D53E0-982C1682-46B44BD6-877A9872-28A0D633C6125F2BE5D933B2_ret|text=|trigger=button}{sub-section}{sub-section:597611F7828D53E0-982C1682-46B44BD6-877A9872-28A0D633C6125F2BE5D933B2_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:597611F7828D53E0-982C1682-46B44BD6-877A9872-28A0D633C6125F2BE5D933B2_see|text=|trigger=button}{sub-section}{sub-section:597611F7828D53E0-982C1682-46B44BD6-877A9872-28A0D633C6125F2BE5D933B2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:597611F7828D53E0-982C1682-46B44BD6-877A9872-28A0D633C6125F2BE5D933B2_see|text=|trigger=button}{sub-section}{sub-section:597611F7828D53E0-982C1682-46B44BD6-877A9872-28A0D633C6125F2BE5D933B2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:597611F7828D53E0-982C1682-46B44BD6-877A9872-28A0D633C6125F2BE5D933B2_sam|text=|trigger=button}{sub-section}{sub-section:597611F7828D53E0-982C1682-46B44BD6-877A9872-28A0D633C6125F2BE5D933B2_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=2A3B385AEC6E0EA2-0D4B6A69-48954591-82159955-C1149E5A10BDD58F11C75695}{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:2A3B385AEC6E0EA2-0D4B6A69-48954591-82159955-C1149E5A10BDD58F11C75695_des|text=|trigger=button}{sub-section}{sub-section:2A3B385AEC6E0EA2-0D4B6A69-48954591-82159955-C1149E5A10BDD58F11C75695_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:2A3B385AEC6E0EA2-0D4B6A69-48954591-82159955-C1149E5A10BDD58F11C75695_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2A3B385AEC6E0EA2-0D4B6A69-48954591-82159955-C1149E5A10BDD58F11C75695_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:2A3B385AEC6E0EA2-0D4B6A69-48954591-82159955-C1149E5A10BDD58F11C75695_ret|text=|trigger=button}{sub-section}{sub-section:2A3B385AEC6E0EA2-0D4B6A69-48954591-82159955-C1149E5A10BDD58F11C75695_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2A3B385AEC6E0EA2-0D4B6A69-48954591-82159955-C1149E5A10BDD58F11C75695_see|text=|trigger=button}{sub-section}{sub-section:2A3B385AEC6E0EA2-0D4B6A69-48954591-82159955-C1149E5A10BDD58F11C75695_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2A3B385AEC6E0EA2-0D4B6A69-48954591-82159955-C1149E5A10BDD58F11C75695_see|text=|trigger=button}{sub-section}{sub-section:2A3B385AEC6E0EA2-0D4B6A69-48954591-82159955-C1149E5A10BDD58F11C75695_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2A3B385AEC6E0EA2-0D4B6A69-48954591-82159955-C1149E5A10BDD58F11C75695_sam|text=|trigger=button}{sub-section}{sub-section:2A3B385AEC6E0EA2-0D4B6A69-48954591-82159955-C1149E5A10BDD58F11C75695_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=C4C6E854143B1F0C-08BCEFCF-4B674EAD-B86D94DD-E5708EF28FDA6D8454649BA3}{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:C4C6E854143B1F0C-08BCEFCF-4B674EAD-B86D94DD-E5708EF28FDA6D8454649BA3_des|text=|trigger=button}{sub-section}{sub-section:C4C6E854143B1F0C-08BCEFCF-4B674EAD-B86D94DD-E5708EF28FDA6D8454649BA3_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:C4C6E854143B1F0C-08BCEFCF-4B674EAD-B86D94DD-E5708EF28FDA6D8454649BA3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C4C6E854143B1F0C-08BCEFCF-4B674EAD-B86D94DD-E5708EF28FDA6D8454649BA3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C4C6E854143B1F0C-08BCEFCF-4B674EAD-B86D94DD-E5708EF28FDA6D8454649BA3_ret|text=|trigger=button}{sub-section}{sub-section:C4C6E854143B1F0C-08BCEFCF-4B674EAD-B86D94DD-E5708EF28FDA6D8454649BA3_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C4C6E854143B1F0C-08BCEFCF-4B674EAD-B86D94DD-E5708EF28FDA6D8454649BA3_see|text=|trigger=button}{sub-section}{sub-section:C4C6E854143B1F0C-08BCEFCF-4B674EAD-B86D94DD-E5708EF28FDA6D8454649BA3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C4C6E854143B1F0C-08BCEFCF-4B674EAD-B86D94DD-E5708EF28FDA6D8454649BA3_see|text=|trigger=button}{sub-section}{sub-section:C4C6E854143B1F0C-08BCEFCF-4B674EAD-B86D94DD-E5708EF28FDA6D8454649BA3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C4C6E854143B1F0C-08BCEFCF-4B674EAD-B86D94DD-E5708EF28FDA6D8454649BA3_sam|text=|trigger=button}{sub-section}{sub-section:C4C6E854143B1F0C-08BCEFCF-4B674EAD-B86D94DD-E5708EF28FDA6D8454649BA3_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=11F9A281E8011E9D-8199A220-442D46E4-B5988623-331DCE9FF51CC5C52A11B9B5}{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:11F9A281E8011E9D-8199A220-442D46E4-B5988623-331DCE9FF51CC5C52A11B9B5_des|text=|trigger=button}{sub-section}{sub-section:11F9A281E8011E9D-8199A220-442D46E4-B5988623-331DCE9FF51CC5C52A11B9B5_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:11F9A281E8011E9D-8199A220-442D46E4-B5988623-331DCE9FF51CC5C52A11B9B5_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:11F9A281E8011E9D-8199A220-442D46E4-B5988623-331DCE9FF51CC5C52A11B9B5_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:11F9A281E8011E9D-8199A220-442D46E4-B5988623-331DCE9FF51CC5C52A11B9B5_ret|text=|trigger=button}{sub-section}{sub-section:11F9A281E8011E9D-8199A220-442D46E4-B5988623-331DCE9FF51CC5C52A11B9B5_ret|trigger=none|class=sIndent}[Date]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:11F9A281E8011E9D-8199A220-442D46E4-B5988623-331DCE9FF51CC5C52A11B9B5_see|text=|trigger=button}{sub-section}{sub-section:11F9A281E8011E9D-8199A220-442D46E4-B5988623-331DCE9FF51CC5C52A11B9B5_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:11F9A281E8011E9D-8199A220-442D46E4-B5988623-331DCE9FF51CC5C52A11B9B5_see|text=|trigger=button}{sub-section}{sub-section:11F9A281E8011E9D-8199A220-442D46E4-B5988623-331DCE9FF51CC5C52A11B9B5_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:11F9A281E8011E9D-8199A220-442D46E4-B5988623-331DCE9FF51CC5C52A11B9B5_sam|text=|trigger=button}{sub-section}{sub-section:11F9A281E8011E9D-8199A220-442D46E4-B5988623-331DCE9FF51CC5C52A11B9B5_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=968EB987D1725DE3-49DC71B8-4D334FA6-8B7FBEA5-F107FAA4D56D462BD2CC4A82}{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:968EB987D1725DE3-49DC71B8-4D334FA6-8B7FBEA5-F107FAA4D56D462BD2CC4A82_des|text=|trigger=button}{sub-section}{sub-section:968EB987D1725DE3-49DC71B8-4D334FA6-8B7FBEA5-F107FAA4D56D462BD2CC4A82_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:968EB987D1725DE3-49DC71B8-4D334FA6-8B7FBEA5-F107FAA4D56D462BD2CC4A82_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:968EB987D1725DE3-49DC71B8-4D334FA6-8B7FBEA5-F107FAA4D56D462BD2CC4A82_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:968EB987D1725DE3-49DC71B8-4D334FA6-8B7FBEA5-F107FAA4D56D462BD2CC4A82_ret|text=|trigger=button}{sub-section}{sub-section:968EB987D1725DE3-49DC71B8-4D334FA6-8B7FBEA5-F107FAA4D56D462BD2CC4A82_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:968EB987D1725DE3-49DC71B8-4D334FA6-8B7FBEA5-F107FAA4D56D462BD2CC4A82_see|text=|trigger=button}{sub-section}{sub-section:968EB987D1725DE3-49DC71B8-4D334FA6-8B7FBEA5-F107FAA4D56D462BD2CC4A82_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:968EB987D1725DE3-49DC71B8-4D334FA6-8B7FBEA5-F107FAA4D56D462BD2CC4A82_see|text=|trigger=button}{sub-section}{sub-section:968EB987D1725DE3-49DC71B8-4D334FA6-8B7FBEA5-F107FAA4D56D462BD2CC4A82_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:968EB987D1725DE3-49DC71B8-4D334FA6-8B7FBEA5-F107FAA4D56D462BD2CC4A82_sam|text=|trigger=button}{sub-section}{sub-section:968EB987D1725DE3-49DC71B8-4D334FA6-8B7FBEA5-F107FAA4D56D462BD2CC4A82_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=BA63F0C172B37AC8-69F33933-485D48DA-A44685FB-1A65920E01FA1F059ACAA32C}{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:BA63F0C172B37AC8-69F33933-485D48DA-A44685FB-1A65920E01FA1F059ACAA32C_des|text=|trigger=button}{sub-section}{sub-section:BA63F0C172B37AC8-69F33933-485D48DA-A44685FB-1A65920E01FA1F059ACAA32C_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:BA63F0C172B37AC8-69F33933-485D48DA-A44685FB-1A65920E01FA1F059ACAA32C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BA63F0C172B37AC8-69F33933-485D48DA-A44685FB-1A65920E01FA1F059ACAA32C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:BA63F0C172B37AC8-69F33933-485D48DA-A44685FB-1A65920E01FA1F059ACAA32C_ret|text=|trigger=button}{sub-section}{sub-section:BA63F0C172B37AC8-69F33933-485D48DA-A44685FB-1A65920E01FA1F059ACAA32C_ret|trigger=none|class=sIndent}[JSFile]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BA63F0C172B37AC8-69F33933-485D48DA-A44685FB-1A65920E01FA1F059ACAA32C_see|text=|trigger=button}{sub-section}{sub-section:BA63F0C172B37AC8-69F33933-485D48DA-A44685FB-1A65920E01FA1F059ACAA32C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BA63F0C172B37AC8-69F33933-485D48DA-A44685FB-1A65920E01FA1F059ACAA32C_see|text=|trigger=button}{sub-section}{sub-section:BA63F0C172B37AC8-69F33933-485D48DA-A44685FB-1A65920E01FA1F059ACAA32C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BA63F0C172B37AC8-69F33933-485D48DA-A44685FB-1A65920E01FA1F059ACAA32C_sam|text=|trigger=button}{sub-section}{sub-section:BA63F0C172B37AC8-69F33933-485D48DA-A44685FB-1A65920E01FA1F059ACAA32C_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=16AE618987813084-3E7D81F3-475746EF-87FBAFBF-83290256CC7879C9E45BA51B}{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:16AE618987813084-3E7D81F3-475746EF-87FBAFBF-83290256CC7879C9E45BA51B_des|text=|trigger=button}{sub-section}{sub-section:16AE618987813084-3E7D81F3-475746EF-87FBAFBF-83290256CC7879C9E45BA51B_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:16AE618987813084-3E7D81F3-475746EF-87FBAFBF-83290256CC7879C9E45BA51B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:16AE618987813084-3E7D81F3-475746EF-87FBAFBF-83290256CC7879C9E45BA51B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:16AE618987813084-3E7D81F3-475746EF-87FBAFBF-83290256CC7879C9E45BA51B_ret|text=|trigger=button}{sub-section}{sub-section:16AE618987813084-3E7D81F3-475746EF-87FBAFBF-83290256CC7879C9E45BA51B_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:16AE618987813084-3E7D81F3-475746EF-87FBAFBF-83290256CC7879C9E45BA51B_see|text=|trigger=button}{sub-section}{sub-section:16AE618987813084-3E7D81F3-475746EF-87FBAFBF-83290256CC7879C9E45BA51B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:16AE618987813084-3E7D81F3-475746EF-87FBAFBF-83290256CC7879C9E45BA51B_see|text=|trigger=button}{sub-section}{sub-section:16AE618987813084-3E7D81F3-475746EF-87FBAFBF-83290256CC7879C9E45BA51B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:16AE618987813084-3E7D81F3-475746EF-87FBAFBF-83290256CC7879C9E45BA51B_sam|text=|trigger=button}{sub-section}{sub-section:16AE618987813084-3E7D81F3-475746EF-87FBAFBF-83290256CC7879C9E45BA51B_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=E13369E0DD70DE8B-FAADCD32-4CD84662-9608AA9B-8BA06D3EB56DDA6E3CA6D780}{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:E13369E0DD70DE8B-FAADCD32-4CD84662-9608AA9B-8BA06D3EB56DDA6E3CA6D780_des|text=|trigger=button}{sub-section}{sub-section:E13369E0DD70DE8B-FAADCD32-4CD84662-9608AA9B-8BA06D3EB56DDA6E3CA6D780_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:E13369E0DD70DE8B-FAADCD32-4CD84662-9608AA9B-8BA06D3EB56DDA6E3CA6D780_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E13369E0DD70DE8B-FAADCD32-4CD84662-9608AA9B-8BA06D3EB56DDA6E3CA6D780_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:E13369E0DD70DE8B-FAADCD32-4CD84662-9608AA9B-8BA06D3EB56DDA6E3CA6D780_ret|text=|trigger=button}{sub-section}{sub-section:E13369E0DD70DE8B-FAADCD32-4CD84662-9608AA9B-8BA06D3EB56DDA6E3CA6D780_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E13369E0DD70DE8B-FAADCD32-4CD84662-9608AA9B-8BA06D3EB56DDA6E3CA6D780_see|text=|trigger=button}{sub-section}{sub-section:E13369E0DD70DE8B-FAADCD32-4CD84662-9608AA9B-8BA06D3EB56DDA6E3CA6D780_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E13369E0DD70DE8B-FAADCD32-4CD84662-9608AA9B-8BA06D3EB56DDA6E3CA6D780_see|text=|trigger=button}{sub-section}{sub-section:E13369E0DD70DE8B-FAADCD32-4CD84662-9608AA9B-8BA06D3EB56DDA6E3CA6D780_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E13369E0DD70DE8B-FAADCD32-4CD84662-9608AA9B-8BA06D3EB56DDA6E3CA6D780_sam|text=|trigger=button}{sub-section}{sub-section:E13369E0DD70DE8B-FAADCD32-4CD84662-9608AA9B-8BA06D3EB56DDA6E3CA6D780_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=4F49E5F169E2AB80-994BF2AC-445E4CC6-BDA0A9CA-8942E2542803CE310B97CA91}{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:4F49E5F169E2AB80-994BF2AC-445E4CC6-BDA0A9CA-8942E2542803CE310B97CA91_des|text=|trigger=button}{sub-section}{sub-section:4F49E5F169E2AB80-994BF2AC-445E4CC6-BDA0A9CA-8942E2542803CE310B97CA91_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:4F49E5F169E2AB80-994BF2AC-445E4CC6-BDA0A9CA-8942E2542803CE310B97CA91_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4F49E5F169E2AB80-994BF2AC-445E4CC6-BDA0A9CA-8942E2542803CE310B97CA91_prs|trigger=none}destination
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:4F49E5F169E2AB80-994BF2AC-445E4CC6-BDA0A9CA-8942E2542803CE310B97CA91_ret|text=|trigger=button}{sub-section}{sub-section:4F49E5F169E2AB80-994BF2AC-445E4CC6-BDA0A9CA-8942E2542803CE310B97CA91_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4F49E5F169E2AB80-994BF2AC-445E4CC6-BDA0A9CA-8942E2542803CE310B97CA91_see|text=|trigger=button}{sub-section}{sub-section:4F49E5F169E2AB80-994BF2AC-445E4CC6-BDA0A9CA-8942E2542803CE310B97CA91_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4F49E5F169E2AB80-994BF2AC-445E4CC6-BDA0A9CA-8942E2542803CE310B97CA91_see|text=|trigger=button}{sub-section}{sub-section:4F49E5F169E2AB80-994BF2AC-445E4CC6-BDA0A9CA-8942E2542803CE310B97CA91_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4F49E5F169E2AB80-994BF2AC-445E4CC6-BDA0A9CA-8942E2542803CE310B97CA91_sam|text=|trigger=button}{sub-section}{sub-section:4F49E5F169E2AB80-994BF2AC-445E4CC6-BDA0A9CA-8942E2542803CE310B97CA91_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=4BB2FA45F3E2C67B-DDA8CF3A-487E4C45-A47A99F1-20881931BABF3F212B7751CF}{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:4BB2FA45F3E2C67B-DDA8CF3A-487E4C45-A47A99F1-20881931BABF3F212B7751CF_des|text=|trigger=button}{sub-section}{sub-section:4BB2FA45F3E2C67B-DDA8CF3A-487E4C45-A47A99F1-20881931BABF3F212B7751CF_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:4BB2FA45F3E2C67B-DDA8CF3A-487E4C45-A47A99F1-20881931BABF3F212B7751CF_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4BB2FA45F3E2C67B-DDA8CF3A-487E4C45-A47A99F1-20881931BABF3F212B7751CF_prs|trigger=none}date
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:4BB2FA45F3E2C67B-DDA8CF3A-487E4C45-A47A99F1-20881931BABF3F212B7751CF_ret|text=|trigger=button}{sub-section}{sub-section:4BB2FA45F3E2C67B-DDA8CF3A-487E4C45-A47A99F1-20881931BABF3F212B7751CF_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4BB2FA45F3E2C67B-DDA8CF3A-487E4C45-A47A99F1-20881931BABF3F212B7751CF_see|text=|trigger=button}{sub-section}{sub-section:4BB2FA45F3E2C67B-DDA8CF3A-487E4C45-A47A99F1-20881931BABF3F212B7751CF_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4BB2FA45F3E2C67B-DDA8CF3A-487E4C45-A47A99F1-20881931BABF3F212B7751CF_see|text=|trigger=button}{sub-section}{sub-section:4BB2FA45F3E2C67B-DDA8CF3A-487E4C45-A47A99F1-20881931BABF3F212B7751CF_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4BB2FA45F3E2C67B-DDA8CF3A-487E4C45-A47A99F1-20881931BABF3F212B7751CF_sam|text=|trigger=button}{sub-section}{sub-section:4BB2FA45F3E2C67B-DDA8CF3A-487E4C45-A47A99F1-20881931BABF3F212B7751CF_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=F48E0AA066D9A072-54D30431-4D15413D-BEFF8DAB-10B8CC8D53784CACFE803497}{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:F48E0AA066D9A072-54D30431-4D15413D-BEFF8DAB-10B8CC8D53784CACFE803497_des|text=|trigger=button}{sub-section}{sub-section:F48E0AA066D9A072-54D30431-4D15413D-BEFF8DAB-10B8CC8D53784CACFE803497_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:F48E0AA066D9A072-54D30431-4D15413D-BEFF8DAB-10B8CC8D53784CACFE803497_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F48E0AA066D9A072-54D30431-4D15413D-BEFF8DAB-10B8CC8D53784CACFE803497_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F48E0AA066D9A072-54D30431-4D15413D-BEFF8DAB-10B8CC8D53784CACFE803497_ret|text=|trigger=button}{sub-section}{sub-section:F48E0AA066D9A072-54D30431-4D15413D-BEFF8DAB-10B8CC8D53784CACFE803497_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F48E0AA066D9A072-54D30431-4D15413D-BEFF8DAB-10B8CC8D53784CACFE803497_see|text=|trigger=button}{sub-section}{sub-section:F48E0AA066D9A072-54D30431-4D15413D-BEFF8DAB-10B8CC8D53784CACFE803497_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F48E0AA066D9A072-54D30431-4D15413D-BEFF8DAB-10B8CC8D53784CACFE803497_see|text=|trigger=button}{sub-section}{sub-section:F48E0AA066D9A072-54D30431-4D15413D-BEFF8DAB-10B8CC8D53784CACFE803497_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F48E0AA066D9A072-54D30431-4D15413D-BEFF8DAB-10B8CC8D53784CACFE803497_sam|text=|trigger=button}{sub-section}{sub-section:F48E0AA066D9A072-54D30431-4D15413D-BEFF8DAB-10B8CC8D53784CACFE803497_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=A7CBC2251525A36A-EB8BE746-476445B5-AE26AE82-D7939F23B09ABA60CA63D16B}{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:A7CBC2251525A36A-EB8BE746-476445B5-AE26AE82-D7939F23B09ABA60CA63D16B_des|text=|trigger=button}{sub-section}{sub-section:A7CBC2251525A36A-EB8BE746-476445B5-AE26AE82-D7939F23B09ABA60CA63D16B_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:A7CBC2251525A36A-EB8BE746-476445B5-AE26AE82-D7939F23B09ABA60CA63D16B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A7CBC2251525A36A-EB8BE746-476445B5-AE26AE82-D7939F23B09ABA60CA63D16B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A7CBC2251525A36A-EB8BE746-476445B5-AE26AE82-D7939F23B09ABA60CA63D16B_ret|text=|trigger=button}{sub-section}{sub-section:A7CBC2251525A36A-EB8BE746-476445B5-AE26AE82-D7939F23B09ABA60CA63D16B_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A7CBC2251525A36A-EB8BE746-476445B5-AE26AE82-D7939F23B09ABA60CA63D16B_see|text=|trigger=button}{sub-section}{sub-section:A7CBC2251525A36A-EB8BE746-476445B5-AE26AE82-D7939F23B09ABA60CA63D16B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A7CBC2251525A36A-EB8BE746-476445B5-AE26AE82-D7939F23B09ABA60CA63D16B_see|text=|trigger=button}{sub-section}{sub-section:A7CBC2251525A36A-EB8BE746-476445B5-AE26AE82-D7939F23B09ABA60CA63D16B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A7CBC2251525A36A-EB8BE746-476445B5-AE26AE82-D7939F23B09ABA60CA63D16B_sam|text=|trigger=button}{sub-section}{sub-section:A7CBC2251525A36A-EB8BE746-476445B5-AE26AE82-D7939F23B09ABA60CA63D16B_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}