{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=10C914B8-E7F7-4FA0-84DD-8434677B7160}{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:10C914B8-E7F7-4FA0-84DD-8434677B7160_des|text=|trigger=button}{sub-section}{sub-section:10C914B8-E7F7-4FA0-84DD-8434677B7160_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:10C914B8-E7F7-4FA0-84DD-8434677B7160_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:10C914B8-E7F7-4FA0-84DD-8434677B7160_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:10C914B8-E7F7-4FA0-84DD-8434677B7160_ret|text=|trigger=button}{sub-section}{sub-section:10C914B8-E7F7-4FA0-84DD-8434677B7160_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:10C914B8-E7F7-4FA0-84DD-8434677B7160_see|text=|trigger=button}{sub-section}{sub-section:10C914B8-E7F7-4FA0-84DD-8434677B7160_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:10C914B8-E7F7-4FA0-84DD-8434677B7160_see|text=|trigger=button}{sub-section}{sub-section:10C914B8-E7F7-4FA0-84DD-8434677B7160_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:10C914B8-E7F7-4FA0-84DD-8434677B7160_sam|text=|trigger=button}{sub-section}{sub-section:10C914B8-E7F7-4FA0-84DD-8434677B7160_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=1563A33D-FD4F-40D0-AFEA-EAED2FD07EA0}{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:1563A33D-FD4F-40D0-AFEA-EAED2FD07EA0_des|text=|trigger=button}{sub-section}{sub-section:1563A33D-FD4F-40D0-AFEA-EAED2FD07EA0_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:1563A33D-FD4F-40D0-AFEA-EAED2FD07EA0_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1563A33D-FD4F-40D0-AFEA-EAED2FD07EA0_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:1563A33D-FD4F-40D0-AFEA-EAED2FD07EA0_ret|text=|trigger=button}{sub-section}{sub-section:1563A33D-FD4F-40D0-AFEA-EAED2FD07EA0_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1563A33D-FD4F-40D0-AFEA-EAED2FD07EA0_see|text=|trigger=button}{sub-section}{sub-section:1563A33D-FD4F-40D0-AFEA-EAED2FD07EA0_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1563A33D-FD4F-40D0-AFEA-EAED2FD07EA0_see|text=|trigger=button}{sub-section}{sub-section:1563A33D-FD4F-40D0-AFEA-EAED2FD07EA0_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1563A33D-FD4F-40D0-AFEA-EAED2FD07EA0_sam|text=|trigger=button}{sub-section}{sub-section:1563A33D-FD4F-40D0-AFEA-EAED2FD07EA0_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=5764434E-E027-43F3-98D6-5DE750DEBCC7}{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:5764434E-E027-43F3-98D6-5DE750DEBCC7_des|text=|trigger=button}{sub-section}{sub-section:5764434E-E027-43F3-98D6-5DE750DEBCC7_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:5764434E-E027-43F3-98D6-5DE750DEBCC7_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5764434E-E027-43F3-98D6-5DE750DEBCC7_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:5764434E-E027-43F3-98D6-5DE750DEBCC7_ret|text=|trigger=button}{sub-section}{sub-section:5764434E-E027-43F3-98D6-5DE750DEBCC7_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5764434E-E027-43F3-98D6-5DE750DEBCC7_see|text=|trigger=button}{sub-section}{sub-section:5764434E-E027-43F3-98D6-5DE750DEBCC7_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5764434E-E027-43F3-98D6-5DE750DEBCC7_see|text=|trigger=button}{sub-section}{sub-section:5764434E-E027-43F3-98D6-5DE750DEBCC7_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5764434E-E027-43F3-98D6-5DE750DEBCC7_sam|text=|trigger=button}{sub-section}{sub-section:5764434E-E027-43F3-98D6-5DE750DEBCC7_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=255EAC07-59B4-4686-8AA1-5ADE02CA73E2}{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:255EAC07-59B4-4686-8AA1-5ADE02CA73E2_des|text=|trigger=button}{sub-section}{sub-section:255EAC07-59B4-4686-8AA1-5ADE02CA73E2_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:255EAC07-59B4-4686-8AA1-5ADE02CA73E2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:255EAC07-59B4-4686-8AA1-5ADE02CA73E2_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:255EAC07-59B4-4686-8AA1-5ADE02CA73E2_ret|text=|trigger=button}{sub-section}{sub-section:255EAC07-59B4-4686-8AA1-5ADE02CA73E2_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:255EAC07-59B4-4686-8AA1-5ADE02CA73E2_see|text=|trigger=button}{sub-section}{sub-section:255EAC07-59B4-4686-8AA1-5ADE02CA73E2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:255EAC07-59B4-4686-8AA1-5ADE02CA73E2_see|text=|trigger=button}{sub-section}{sub-section:255EAC07-59B4-4686-8AA1-5ADE02CA73E2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:255EAC07-59B4-4686-8AA1-5ADE02CA73E2_sam|text=|trigger=button}{sub-section}{sub-section:255EAC07-59B4-4686-8AA1-5ADE02CA73E2_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=4C7331D7-1876-4CEF-A710-5BF79B537452}{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:4C7331D7-1876-4CEF-A710-5BF79B537452_des|text=|trigger=button}{sub-section}{sub-section:4C7331D7-1876-4CEF-A710-5BF79B537452_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:4C7331D7-1876-4CEF-A710-5BF79B537452_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4C7331D7-1876-4CEF-A710-5BF79B537452_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:4C7331D7-1876-4CEF-A710-5BF79B537452_ret|text=|trigger=button}{sub-section}{sub-section:4C7331D7-1876-4CEF-A710-5BF79B537452_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4C7331D7-1876-4CEF-A710-5BF79B537452_see|text=|trigger=button}{sub-section}{sub-section:4C7331D7-1876-4CEF-A710-5BF79B537452_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4C7331D7-1876-4CEF-A710-5BF79B537452_see|text=|trigger=button}{sub-section}{sub-section:4C7331D7-1876-4CEF-A710-5BF79B537452_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4C7331D7-1876-4CEF-A710-5BF79B537452_sam|text=|trigger=button}{sub-section}{sub-section:4C7331D7-1876-4CEF-A710-5BF79B537452_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=A3AD3587-8EE4-4BE5-8356-745783B1B836}{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:A3AD3587-8EE4-4BE5-8356-745783B1B836_des|text=|trigger=button}{sub-section}{sub-section:A3AD3587-8EE4-4BE5-8356-745783B1B836_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:A3AD3587-8EE4-4BE5-8356-745783B1B836_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A3AD3587-8EE4-4BE5-8356-745783B1B836_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A3AD3587-8EE4-4BE5-8356-745783B1B836_ret|text=|trigger=button}{sub-section}{sub-section:A3AD3587-8EE4-4BE5-8356-745783B1B836_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A3AD3587-8EE4-4BE5-8356-745783B1B836_see|text=|trigger=button}{sub-section}{sub-section:A3AD3587-8EE4-4BE5-8356-745783B1B836_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A3AD3587-8EE4-4BE5-8356-745783B1B836_see|text=|trigger=button}{sub-section}{sub-section:A3AD3587-8EE4-4BE5-8356-745783B1B836_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A3AD3587-8EE4-4BE5-8356-745783B1B836_sam|text=|trigger=button}{sub-section}{sub-section:A3AD3587-8EE4-4BE5-8356-745783B1B836_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=EA540009-48AB-4B80-9EE9-FCE85E586CEA}{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:EA540009-48AB-4B80-9EE9-FCE85E586CEA_des|text=|trigger=button}{sub-section}{sub-section:EA540009-48AB-4B80-9EE9-FCE85E586CEA_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:EA540009-48AB-4B80-9EE9-FCE85E586CEA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EA540009-48AB-4B80-9EE9-FCE85E586CEA_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:EA540009-48AB-4B80-9EE9-FCE85E586CEA_ret|text=|trigger=button}{sub-section}{sub-section:EA540009-48AB-4B80-9EE9-FCE85E586CEA_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:EA540009-48AB-4B80-9EE9-FCE85E586CEA_see|text=|trigger=button}{sub-section}{sub-section:EA540009-48AB-4B80-9EE9-FCE85E586CEA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:EA540009-48AB-4B80-9EE9-FCE85E586CEA_see|text=|trigger=button}{sub-section}{sub-section:EA540009-48AB-4B80-9EE9-FCE85E586CEA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:EA540009-48AB-4B80-9EE9-FCE85E586CEA_sam|text=|trigger=button}{sub-section}{sub-section:EA540009-48AB-4B80-9EE9-FCE85E586CEA_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=33561C6F-AB6E-45DA-885D-6DE9401C23DA}{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:33561C6F-AB6E-45DA-885D-6DE9401C23DA_des|text=|trigger=button}{sub-section}{sub-section:33561C6F-AB6E-45DA-885D-6DE9401C23DA_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:33561C6F-AB6E-45DA-885D-6DE9401C23DA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:33561C6F-AB6E-45DA-885D-6DE9401C23DA_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:33561C6F-AB6E-45DA-885D-6DE9401C23DA_ret|text=|trigger=button}{sub-section}{sub-section:33561C6F-AB6E-45DA-885D-6DE9401C23DA_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:33561C6F-AB6E-45DA-885D-6DE9401C23DA_see|text=|trigger=button}{sub-section}{sub-section:33561C6F-AB6E-45DA-885D-6DE9401C23DA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:33561C6F-AB6E-45DA-885D-6DE9401C23DA_see|text=|trigger=button}{sub-section}{sub-section:33561C6F-AB6E-45DA-885D-6DE9401C23DA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:33561C6F-AB6E-45DA-885D-6DE9401C23DA_sam|text=|trigger=button}{sub-section}{sub-section:33561C6F-AB6E-45DA-885D-6DE9401C23DA_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=C877D2D3-CA36-4761-9B7C-CB8B19559401}{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:C877D2D3-CA36-4761-9B7C-CB8B19559401_des|text=|trigger=button}{sub-section}{sub-section:C877D2D3-CA36-4761-9B7C-CB8B19559401_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:C877D2D3-CA36-4761-9B7C-CB8B19559401_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C877D2D3-CA36-4761-9B7C-CB8B19559401_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C877D2D3-CA36-4761-9B7C-CB8B19559401_ret|text=|trigger=button}{sub-section}{sub-section:C877D2D3-CA36-4761-9B7C-CB8B19559401_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C877D2D3-CA36-4761-9B7C-CB8B19559401_see|text=|trigger=button}{sub-section}{sub-section:C877D2D3-CA36-4761-9B7C-CB8B19559401_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C877D2D3-CA36-4761-9B7C-CB8B19559401_see|text=|trigger=button}{sub-section}{sub-section:C877D2D3-CA36-4761-9B7C-CB8B19559401_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C877D2D3-CA36-4761-9B7C-CB8B19559401_sam|text=|trigger=button}{sub-section}{sub-section:C877D2D3-CA36-4761-9B7C-CB8B19559401_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=ECD288D3-7479-4B9F-9A26-8D2698E228CD}{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:ECD288D3-7479-4B9F-9A26-8D2698E228CD_des|text=|trigger=button}{sub-section}{sub-section:ECD288D3-7479-4B9F-9A26-8D2698E228CD_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:ECD288D3-7479-4B9F-9A26-8D2698E228CD_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ECD288D3-7479-4B9F-9A26-8D2698E228CD_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:ECD288D3-7479-4B9F-9A26-8D2698E228CD_ret|text=|trigger=button}{sub-section}{sub-section:ECD288D3-7479-4B9F-9A26-8D2698E228CD_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:ECD288D3-7479-4B9F-9A26-8D2698E228CD_see|text=|trigger=button}{sub-section}{sub-section:ECD288D3-7479-4B9F-9A26-8D2698E228CD_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:ECD288D3-7479-4B9F-9A26-8D2698E228CD_see|text=|trigger=button}{sub-section}{sub-section:ECD288D3-7479-4B9F-9A26-8D2698E228CD_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:ECD288D3-7479-4B9F-9A26-8D2698E228CD_sam|text=|trigger=button}{sub-section}{sub-section:ECD288D3-7479-4B9F-9A26-8D2698E228CD_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=B91DEDDE-1E86-4D43-AB06-510C590688D3}{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:B91DEDDE-1E86-4D43-AB06-510C590688D3_des|text=|trigger=button}{sub-section}{sub-section:B91DEDDE-1E86-4D43-AB06-510C590688D3_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:B91DEDDE-1E86-4D43-AB06-510C590688D3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B91DEDDE-1E86-4D43-AB06-510C590688D3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:B91DEDDE-1E86-4D43-AB06-510C590688D3_ret|text=|trigger=button}{sub-section}{sub-section:B91DEDDE-1E86-4D43-AB06-510C590688D3_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B91DEDDE-1E86-4D43-AB06-510C590688D3_see|text=|trigger=button}{sub-section}{sub-section:B91DEDDE-1E86-4D43-AB06-510C590688D3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B91DEDDE-1E86-4D43-AB06-510C590688D3_see|text=|trigger=button}{sub-section}{sub-section:B91DEDDE-1E86-4D43-AB06-510C590688D3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B91DEDDE-1E86-4D43-AB06-510C590688D3_sam|text=|trigger=button}{sub-section}{sub-section:B91DEDDE-1E86-4D43-AB06-510C590688D3_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=87108F54-E862-47CE-ABAA-8694BB42EEE6}{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:87108F54-E862-47CE-ABAA-8694BB42EEE6_des|text=|trigger=button}{sub-section}{sub-section:87108F54-E862-47CE-ABAA-8694BB42EEE6_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:87108F54-E862-47CE-ABAA-8694BB42EEE6_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:87108F54-E862-47CE-ABAA-8694BB42EEE6_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:87108F54-E862-47CE-ABAA-8694BB42EEE6_ret|text=|trigger=button}{sub-section}{sub-section:87108F54-E862-47CE-ABAA-8694BB42EEE6_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:87108F54-E862-47CE-ABAA-8694BB42EEE6_see|text=|trigger=button}{sub-section}{sub-section:87108F54-E862-47CE-ABAA-8694BB42EEE6_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:87108F54-E862-47CE-ABAA-8694BB42EEE6_see|text=|trigger=button}{sub-section}{sub-section:87108F54-E862-47CE-ABAA-8694BB42EEE6_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:87108F54-E862-47CE-ABAA-8694BB42EEE6_sam|text=|trigger=button}{sub-section}{sub-section:87108F54-E862-47CE-ABAA-8694BB42EEE6_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=699B2141-1F6E-407F-958E-A86F1DEF62D3}{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:699B2141-1F6E-407F-958E-A86F1DEF62D3_des|text=|trigger=button}{sub-section}{sub-section:699B2141-1F6E-407F-958E-A86F1DEF62D3_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:699B2141-1F6E-407F-958E-A86F1DEF62D3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:699B2141-1F6E-407F-958E-A86F1DEF62D3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:699B2141-1F6E-407F-958E-A86F1DEF62D3_ret|text=|trigger=button}{sub-section}{sub-section:699B2141-1F6E-407F-958E-A86F1DEF62D3_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:699B2141-1F6E-407F-958E-A86F1DEF62D3_see|text=|trigger=button}{sub-section}{sub-section:699B2141-1F6E-407F-958E-A86F1DEF62D3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:699B2141-1F6E-407F-958E-A86F1DEF62D3_see|text=|trigger=button}{sub-section}{sub-section:699B2141-1F6E-407F-958E-A86F1DEF62D3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:699B2141-1F6E-407F-958E-A86F1DEF62D3_sam|text=|trigger=button}{sub-section}{sub-section:699B2141-1F6E-407F-958E-A86F1DEF62D3_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=828D53E0-1682-4BD6-9872-5F2BE5D933B2}{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:828D53E0-1682-4BD6-9872-5F2BE5D933B2_des|text=|trigger=button}{sub-section}{sub-section:828D53E0-1682-4BD6-9872-5F2BE5D933B2_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:828D53E0-1682-4BD6-9872-5F2BE5D933B2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:828D53E0-1682-4BD6-9872-5F2BE5D933B2_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:828D53E0-1682-4BD6-9872-5F2BE5D933B2_ret|text=|trigger=button}{sub-section}{sub-section:828D53E0-1682-4BD6-9872-5F2BE5D933B2_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:828D53E0-1682-4BD6-9872-5F2BE5D933B2_see|text=|trigger=button}{sub-section}{sub-section:828D53E0-1682-4BD6-9872-5F2BE5D933B2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:828D53E0-1682-4BD6-9872-5F2BE5D933B2_see|text=|trigger=button}{sub-section}{sub-section:828D53E0-1682-4BD6-9872-5F2BE5D933B2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:828D53E0-1682-4BD6-9872-5F2BE5D933B2_sam|text=|trigger=button}{sub-section}{sub-section:828D53E0-1682-4BD6-9872-5F2BE5D933B2_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=EC6E0EA2-6A69-4591-9955-D58F11C75695}{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:EC6E0EA2-6A69-4591-9955-D58F11C75695_des|text=|trigger=button}{sub-section}{sub-section:EC6E0EA2-6A69-4591-9955-D58F11C75695_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:EC6E0EA2-6A69-4591-9955-D58F11C75695_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EC6E0EA2-6A69-4591-9955-D58F11C75695_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:EC6E0EA2-6A69-4591-9955-D58F11C75695_ret|text=|trigger=button}{sub-section}{sub-section:EC6E0EA2-6A69-4591-9955-D58F11C75695_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:EC6E0EA2-6A69-4591-9955-D58F11C75695_see|text=|trigger=button}{sub-section}{sub-section:EC6E0EA2-6A69-4591-9955-D58F11C75695_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:EC6E0EA2-6A69-4591-9955-D58F11C75695_see|text=|trigger=button}{sub-section}{sub-section:EC6E0EA2-6A69-4591-9955-D58F11C75695_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:EC6E0EA2-6A69-4591-9955-D58F11C75695_sam|text=|trigger=button}{sub-section}{sub-section:EC6E0EA2-6A69-4591-9955-D58F11C75695_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=143B1F0C-EFCF-4EAD-94DD-6D8454649BA3}{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:143B1F0C-EFCF-4EAD-94DD-6D8454649BA3_des|text=|trigger=button}{sub-section}{sub-section:143B1F0C-EFCF-4EAD-94DD-6D8454649BA3_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:143B1F0C-EFCF-4EAD-94DD-6D8454649BA3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:143B1F0C-EFCF-4EAD-94DD-6D8454649BA3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:143B1F0C-EFCF-4EAD-94DD-6D8454649BA3_ret|text=|trigger=button}{sub-section}{sub-section:143B1F0C-EFCF-4EAD-94DD-6D8454649BA3_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:143B1F0C-EFCF-4EAD-94DD-6D8454649BA3_see|text=|trigger=button}{sub-section}{sub-section:143B1F0C-EFCF-4EAD-94DD-6D8454649BA3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:143B1F0C-EFCF-4EAD-94DD-6D8454649BA3_see|text=|trigger=button}{sub-section}{sub-section:143B1F0C-EFCF-4EAD-94DD-6D8454649BA3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:143B1F0C-EFCF-4EAD-94DD-6D8454649BA3_sam|text=|trigger=button}{sub-section}{sub-section:143B1F0C-EFCF-4EAD-94DD-6D8454649BA3_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=E8011E9D-A220-46E4-8623-C5C52A11B9B5}{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:E8011E9D-A220-46E4-8623-C5C52A11B9B5_des|text=|trigger=button}{sub-section}{sub-section:E8011E9D-A220-46E4-8623-C5C52A11B9B5_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:E8011E9D-A220-46E4-8623-C5C52A11B9B5_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E8011E9D-A220-46E4-8623-C5C52A11B9B5_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:E8011E9D-A220-46E4-8623-C5C52A11B9B5_ret|text=|trigger=button}{sub-section}{sub-section:E8011E9D-A220-46E4-8623-C5C52A11B9B5_ret|trigger=none|class=sIndent}[Date]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E8011E9D-A220-46E4-8623-C5C52A11B9B5_see|text=|trigger=button}{sub-section}{sub-section:E8011E9D-A220-46E4-8623-C5C52A11B9B5_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E8011E9D-A220-46E4-8623-C5C52A11B9B5_see|text=|trigger=button}{sub-section}{sub-section:E8011E9D-A220-46E4-8623-C5C52A11B9B5_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E8011E9D-A220-46E4-8623-C5C52A11B9B5_sam|text=|trigger=button}{sub-section}{sub-section:E8011E9D-A220-46E4-8623-C5C52A11B9B5_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=D1725DE3-71B8-4FA6-BEA5-462BD2CC4A82}{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:D1725DE3-71B8-4FA6-BEA5-462BD2CC4A82_des|text=|trigger=button}{sub-section}{sub-section:D1725DE3-71B8-4FA6-BEA5-462BD2CC4A82_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:D1725DE3-71B8-4FA6-BEA5-462BD2CC4A82_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D1725DE3-71B8-4FA6-BEA5-462BD2CC4A82_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D1725DE3-71B8-4FA6-BEA5-462BD2CC4A82_ret|text=|trigger=button}{sub-section}{sub-section:D1725DE3-71B8-4FA6-BEA5-462BD2CC4A82_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D1725DE3-71B8-4FA6-BEA5-462BD2CC4A82_see|text=|trigger=button}{sub-section}{sub-section:D1725DE3-71B8-4FA6-BEA5-462BD2CC4A82_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D1725DE3-71B8-4FA6-BEA5-462BD2CC4A82_see|text=|trigger=button}{sub-section}{sub-section:D1725DE3-71B8-4FA6-BEA5-462BD2CC4A82_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D1725DE3-71B8-4FA6-BEA5-462BD2CC4A82_sam|text=|trigger=button}{sub-section}{sub-section:D1725DE3-71B8-4FA6-BEA5-462BD2CC4A82_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=72B37AC8-3933-48DA-85FB-1F059ACAA32C}{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:72B37AC8-3933-48DA-85FB-1F059ACAA32C_des|text=|trigger=button}{sub-section}{sub-section:72B37AC8-3933-48DA-85FB-1F059ACAA32C_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:72B37AC8-3933-48DA-85FB-1F059ACAA32C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:72B37AC8-3933-48DA-85FB-1F059ACAA32C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:72B37AC8-3933-48DA-85FB-1F059ACAA32C_ret|text=|trigger=button}{sub-section}{sub-section:72B37AC8-3933-48DA-85FB-1F059ACAA32C_ret|trigger=none|class=sIndent}[JSFile]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:72B37AC8-3933-48DA-85FB-1F059ACAA32C_see|text=|trigger=button}{sub-section}{sub-section:72B37AC8-3933-48DA-85FB-1F059ACAA32C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:72B37AC8-3933-48DA-85FB-1F059ACAA32C_see|text=|trigger=button}{sub-section}{sub-section:72B37AC8-3933-48DA-85FB-1F059ACAA32C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:72B37AC8-3933-48DA-85FB-1F059ACAA32C_sam|text=|trigger=button}{sub-section}{sub-section:72B37AC8-3933-48DA-85FB-1F059ACAA32C_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=87813084-81F3-46EF-AFBF-79C9E45BA51B}{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:87813084-81F3-46EF-AFBF-79C9E45BA51B_des|text=|trigger=button}{sub-section}{sub-section:87813084-81F3-46EF-AFBF-79C9E45BA51B_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:87813084-81F3-46EF-AFBF-79C9E45BA51B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:87813084-81F3-46EF-AFBF-79C9E45BA51B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:87813084-81F3-46EF-AFBF-79C9E45BA51B_ret|text=|trigger=button}{sub-section}{sub-section:87813084-81F3-46EF-AFBF-79C9E45BA51B_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:87813084-81F3-46EF-AFBF-79C9E45BA51B_see|text=|trigger=button}{sub-section}{sub-section:87813084-81F3-46EF-AFBF-79C9E45BA51B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:87813084-81F3-46EF-AFBF-79C9E45BA51B_see|text=|trigger=button}{sub-section}{sub-section:87813084-81F3-46EF-AFBF-79C9E45BA51B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:87813084-81F3-46EF-AFBF-79C9E45BA51B_sam|text=|trigger=button}{sub-section}{sub-section:87813084-81F3-46EF-AFBF-79C9E45BA51B_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=DD70DE8B-CD32-4662-AA9B-DA6E3CA6D780}{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:DD70DE8B-CD32-4662-AA9B-DA6E3CA6D780_des|text=|trigger=button}{sub-section}{sub-section:DD70DE8B-CD32-4662-AA9B-DA6E3CA6D780_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:DD70DE8B-CD32-4662-AA9B-DA6E3CA6D780_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:DD70DE8B-CD32-4662-AA9B-DA6E3CA6D780_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:DD70DE8B-CD32-4662-AA9B-DA6E3CA6D780_ret|text=|trigger=button}{sub-section}{sub-section:DD70DE8B-CD32-4662-AA9B-DA6E3CA6D780_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:DD70DE8B-CD32-4662-AA9B-DA6E3CA6D780_see|text=|trigger=button}{sub-section}{sub-section:DD70DE8B-CD32-4662-AA9B-DA6E3CA6D780_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:DD70DE8B-CD32-4662-AA9B-DA6E3CA6D780_see|text=|trigger=button}{sub-section}{sub-section:DD70DE8B-CD32-4662-AA9B-DA6E3CA6D780_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:DD70DE8B-CD32-4662-AA9B-DA6E3CA6D780_sam|text=|trigger=button}{sub-section}{sub-section:DD70DE8B-CD32-4662-AA9B-DA6E3CA6D780_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=69E2AB80-F2AC-4CC6-A9CA-CE310B97CA91}{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:69E2AB80-F2AC-4CC6-A9CA-CE310B97CA91_des|text=|trigger=button}{sub-section}{sub-section:69E2AB80-F2AC-4CC6-A9CA-CE310B97CA91_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:69E2AB80-F2AC-4CC6-A9CA-CE310B97CA91_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:69E2AB80-F2AC-4CC6-A9CA-CE310B97CA91_prs|trigger=none}destination
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:69E2AB80-F2AC-4CC6-A9CA-CE310B97CA91_ret|text=|trigger=button}{sub-section}{sub-section:69E2AB80-F2AC-4CC6-A9CA-CE310B97CA91_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:69E2AB80-F2AC-4CC6-A9CA-CE310B97CA91_see|text=|trigger=button}{sub-section}{sub-section:69E2AB80-F2AC-4CC6-A9CA-CE310B97CA91_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:69E2AB80-F2AC-4CC6-A9CA-CE310B97CA91_see|text=|trigger=button}{sub-section}{sub-section:69E2AB80-F2AC-4CC6-A9CA-CE310B97CA91_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:69E2AB80-F2AC-4CC6-A9CA-CE310B97CA91_sam|text=|trigger=button}{sub-section}{sub-section:69E2AB80-F2AC-4CC6-A9CA-CE310B97CA91_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=F3E2C67B-CF3A-4C45-99F1-3F212B7751CF}{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:F3E2C67B-CF3A-4C45-99F1-3F212B7751CF_des|text=|trigger=button}{sub-section}{sub-section:F3E2C67B-CF3A-4C45-99F1-3F212B7751CF_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:F3E2C67B-CF3A-4C45-99F1-3F212B7751CF_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F3E2C67B-CF3A-4C45-99F1-3F212B7751CF_prs|trigger=none}date
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:F3E2C67B-CF3A-4C45-99F1-3F212B7751CF_ret|text=|trigger=button}{sub-section}{sub-section:F3E2C67B-CF3A-4C45-99F1-3F212B7751CF_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F3E2C67B-CF3A-4C45-99F1-3F212B7751CF_see|text=|trigger=button}{sub-section}{sub-section:F3E2C67B-CF3A-4C45-99F1-3F212B7751CF_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F3E2C67B-CF3A-4C45-99F1-3F212B7751CF_see|text=|trigger=button}{sub-section}{sub-section:F3E2C67B-CF3A-4C45-99F1-3F212B7751CF_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F3E2C67B-CF3A-4C45-99F1-3F212B7751CF_sam|text=|trigger=button}{sub-section}{sub-section:F3E2C67B-CF3A-4C45-99F1-3F212B7751CF_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=66D9A072-0431-413D-8DAB-4CACFE803497}{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:66D9A072-0431-413D-8DAB-4CACFE803497_des|text=|trigger=button}{sub-section}{sub-section:66D9A072-0431-413D-8DAB-4CACFE803497_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:66D9A072-0431-413D-8DAB-4CACFE803497_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:66D9A072-0431-413D-8DAB-4CACFE803497_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:66D9A072-0431-413D-8DAB-4CACFE803497_ret|text=|trigger=button}{sub-section}{sub-section:66D9A072-0431-413D-8DAB-4CACFE803497_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:66D9A072-0431-413D-8DAB-4CACFE803497_see|text=|trigger=button}{sub-section}{sub-section:66D9A072-0431-413D-8DAB-4CACFE803497_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:66D9A072-0431-413D-8DAB-4CACFE803497_see|text=|trigger=button}{sub-section}{sub-section:66D9A072-0431-413D-8DAB-4CACFE803497_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:66D9A072-0431-413D-8DAB-4CACFE803497_sam|text=|trigger=button}{sub-section}{sub-section:66D9A072-0431-413D-8DAB-4CACFE803497_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=1525A36A-E746-45B5-AE82-BA60CA63D16B}{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:1525A36A-E746-45B5-AE82-BA60CA63D16B_des|text=|trigger=button}{sub-section}{sub-section:1525A36A-E746-45B5-AE82-BA60CA63D16B_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:1525A36A-E746-45B5-AE82-BA60CA63D16B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1525A36A-E746-45B5-AE82-BA60CA63D16B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:1525A36A-E746-45B5-AE82-BA60CA63D16B_ret|text=|trigger=button}{sub-section}{sub-section:1525A36A-E746-45B5-AE82-BA60CA63D16B_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1525A36A-E746-45B5-AE82-BA60CA63D16B_see|text=|trigger=button}{sub-section}{sub-section:1525A36A-E746-45B5-AE82-BA60CA63D16B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1525A36A-E746-45B5-AE82-BA60CA63D16B_see|text=|trigger=button}{sub-section}{sub-section:1525A36A-E746-45B5-AE82-BA60CA63D16B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1525A36A-E746-45B5-AE82-BA60CA63D16B_sam|text=|trigger=button}{sub-section}{sub-section:1525A36A-E746-45B5-AE82-BA60CA63D16B_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}