{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=33168F92-318F-4926-B4C3-4FFAC063A3E1}{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:33168F92-318F-4926-B4C3-4FFAC063A3E1_des|text=|trigger=button}{sub-section}{sub-section:33168F92-318F-4926-B4C3-4FFAC063A3E1_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:33168F92-318F-4926-B4C3-4FFAC063A3E1_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:33168F92-318F-4926-B4C3-4FFAC063A3E1_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:33168F92-318F-4926-B4C3-4FFAC063A3E1_ret|text=|trigger=button}{sub-section}{sub-section:33168F92-318F-4926-B4C3-4FFAC063A3E1_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:33168F92-318F-4926-B4C3-4FFAC063A3E1_see|text=|trigger=button}{sub-section}{sub-section:33168F92-318F-4926-B4C3-4FFAC063A3E1_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:33168F92-318F-4926-B4C3-4FFAC063A3E1_see|text=|trigger=button}{sub-section}{sub-section:33168F92-318F-4926-B4C3-4FFAC063A3E1_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:33168F92-318F-4926-B4C3-4FFAC063A3E1_sam|text=|trigger=button}{sub-section}{sub-section:33168F92-318F-4926-B4C3-4FFAC063A3E1_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=F7F3EEC1-89D8-4CCB-ACED-7398CDB94E45}{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:F7F3EEC1-89D8-4CCB-ACED-7398CDB94E45_des|text=|trigger=button}{sub-section}{sub-section:F7F3EEC1-89D8-4CCB-ACED-7398CDB94E45_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:F7F3EEC1-89D8-4CCB-ACED-7398CDB94E45_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F7F3EEC1-89D8-4CCB-ACED-7398CDB94E45_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F7F3EEC1-89D8-4CCB-ACED-7398CDB94E45_ret|text=|trigger=button}{sub-section}{sub-section:F7F3EEC1-89D8-4CCB-ACED-7398CDB94E45_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F7F3EEC1-89D8-4CCB-ACED-7398CDB94E45_see|text=|trigger=button}{sub-section}{sub-section:F7F3EEC1-89D8-4CCB-ACED-7398CDB94E45_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F7F3EEC1-89D8-4CCB-ACED-7398CDB94E45_see|text=|trigger=button}{sub-section}{sub-section:F7F3EEC1-89D8-4CCB-ACED-7398CDB94E45_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F7F3EEC1-89D8-4CCB-ACED-7398CDB94E45_sam|text=|trigger=button}{sub-section}{sub-section:F7F3EEC1-89D8-4CCB-ACED-7398CDB94E45_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=94A2DD8C-8024-48AB-B253-2A7624B4BA5A}{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:94A2DD8C-8024-48AB-B253-2A7624B4BA5A_des|text=|trigger=button}{sub-section}{sub-section:94A2DD8C-8024-48AB-B253-2A7624B4BA5A_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:94A2DD8C-8024-48AB-B253-2A7624B4BA5A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:94A2DD8C-8024-48AB-B253-2A7624B4BA5A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:94A2DD8C-8024-48AB-B253-2A7624B4BA5A_ret|text=|trigger=button}{sub-section}{sub-section:94A2DD8C-8024-48AB-B253-2A7624B4BA5A_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:94A2DD8C-8024-48AB-B253-2A7624B4BA5A_see|text=|trigger=button}{sub-section}{sub-section:94A2DD8C-8024-48AB-B253-2A7624B4BA5A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:94A2DD8C-8024-48AB-B253-2A7624B4BA5A_see|text=|trigger=button}{sub-section}{sub-section:94A2DD8C-8024-48AB-B253-2A7624B4BA5A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:94A2DD8C-8024-48AB-B253-2A7624B4BA5A_sam|text=|trigger=button}{sub-section}{sub-section:94A2DD8C-8024-48AB-B253-2A7624B4BA5A_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=524F4771-C89F-4D32-BC0A-C6561D2018C0}{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:524F4771-C89F-4D32-BC0A-C6561D2018C0_des|text=|trigger=button}{sub-section}{sub-section:524F4771-C89F-4D32-BC0A-C6561D2018C0_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:524F4771-C89F-4D32-BC0A-C6561D2018C0_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:524F4771-C89F-4D32-BC0A-C6561D2018C0_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:524F4771-C89F-4D32-BC0A-C6561D2018C0_ret|text=|trigger=button}{sub-section}{sub-section:524F4771-C89F-4D32-BC0A-C6561D2018C0_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:524F4771-C89F-4D32-BC0A-C6561D2018C0_see|text=|trigger=button}{sub-section}{sub-section:524F4771-C89F-4D32-BC0A-C6561D2018C0_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:524F4771-C89F-4D32-BC0A-C6561D2018C0_see|text=|trigger=button}{sub-section}{sub-section:524F4771-C89F-4D32-BC0A-C6561D2018C0_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:524F4771-C89F-4D32-BC0A-C6561D2018C0_sam|text=|trigger=button}{sub-section}{sub-section:524F4771-C89F-4D32-BC0A-C6561D2018C0_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=5F12C0FC-BFAC-4A37-B01D-AB6B86108A87}{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:5F12C0FC-BFAC-4A37-B01D-AB6B86108A87_des|text=|trigger=button}{sub-section}{sub-section:5F12C0FC-BFAC-4A37-B01D-AB6B86108A87_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:5F12C0FC-BFAC-4A37-B01D-AB6B86108A87_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5F12C0FC-BFAC-4A37-B01D-AB6B86108A87_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:5F12C0FC-BFAC-4A37-B01D-AB6B86108A87_ret|text=|trigger=button}{sub-section}{sub-section:5F12C0FC-BFAC-4A37-B01D-AB6B86108A87_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5F12C0FC-BFAC-4A37-B01D-AB6B86108A87_see|text=|trigger=button}{sub-section}{sub-section:5F12C0FC-BFAC-4A37-B01D-AB6B86108A87_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5F12C0FC-BFAC-4A37-B01D-AB6B86108A87_see|text=|trigger=button}{sub-section}{sub-section:5F12C0FC-BFAC-4A37-B01D-AB6B86108A87_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5F12C0FC-BFAC-4A37-B01D-AB6B86108A87_sam|text=|trigger=button}{sub-section}{sub-section:5F12C0FC-BFAC-4A37-B01D-AB6B86108A87_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=5D167E2C-9073-4086-8525-0491E7E9C45D}{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:5D167E2C-9073-4086-8525-0491E7E9C45D_des|text=|trigger=button}{sub-section}{sub-section:5D167E2C-9073-4086-8525-0491E7E9C45D_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:5D167E2C-9073-4086-8525-0491E7E9C45D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5D167E2C-9073-4086-8525-0491E7E9C45D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:5D167E2C-9073-4086-8525-0491E7E9C45D_ret|text=|trigger=button}{sub-section}{sub-section:5D167E2C-9073-4086-8525-0491E7E9C45D_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5D167E2C-9073-4086-8525-0491E7E9C45D_see|text=|trigger=button}{sub-section}{sub-section:5D167E2C-9073-4086-8525-0491E7E9C45D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5D167E2C-9073-4086-8525-0491E7E9C45D_see|text=|trigger=button}{sub-section}{sub-section:5D167E2C-9073-4086-8525-0491E7E9C45D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5D167E2C-9073-4086-8525-0491E7E9C45D_sam|text=|trigger=button}{sub-section}{sub-section:5D167E2C-9073-4086-8525-0491E7E9C45D_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=6A0F857D-8E10-476A-8E05-D59FD4F98E72}{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:6A0F857D-8E10-476A-8E05-D59FD4F98E72_des|text=|trigger=button}{sub-section}{sub-section:6A0F857D-8E10-476A-8E05-D59FD4F98E72_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:6A0F857D-8E10-476A-8E05-D59FD4F98E72_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:6A0F857D-8E10-476A-8E05-D59FD4F98E72_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:6A0F857D-8E10-476A-8E05-D59FD4F98E72_ret|text=|trigger=button}{sub-section}{sub-section:6A0F857D-8E10-476A-8E05-D59FD4F98E72_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:6A0F857D-8E10-476A-8E05-D59FD4F98E72_see|text=|trigger=button}{sub-section}{sub-section:6A0F857D-8E10-476A-8E05-D59FD4F98E72_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:6A0F857D-8E10-476A-8E05-D59FD4F98E72_see|text=|trigger=button}{sub-section}{sub-section:6A0F857D-8E10-476A-8E05-D59FD4F98E72_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:6A0F857D-8E10-476A-8E05-D59FD4F98E72_sam|text=|trigger=button}{sub-section}{sub-section:6A0F857D-8E10-476A-8E05-D59FD4F98E72_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=C6F58BD3-1D78-4C8B-A35C-B4EECC1E4943}{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:C6F58BD3-1D78-4C8B-A35C-B4EECC1E4943_des|text=|trigger=button}{sub-section}{sub-section:C6F58BD3-1D78-4C8B-A35C-B4EECC1E4943_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:C6F58BD3-1D78-4C8B-A35C-B4EECC1E4943_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C6F58BD3-1D78-4C8B-A35C-B4EECC1E4943_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C6F58BD3-1D78-4C8B-A35C-B4EECC1E4943_ret|text=|trigger=button}{sub-section}{sub-section:C6F58BD3-1D78-4C8B-A35C-B4EECC1E4943_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C6F58BD3-1D78-4C8B-A35C-B4EECC1E4943_see|text=|trigger=button}{sub-section}{sub-section:C6F58BD3-1D78-4C8B-A35C-B4EECC1E4943_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C6F58BD3-1D78-4C8B-A35C-B4EECC1E4943_see|text=|trigger=button}{sub-section}{sub-section:C6F58BD3-1D78-4C8B-A35C-B4EECC1E4943_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C6F58BD3-1D78-4C8B-A35C-B4EECC1E4943_sam|text=|trigger=button}{sub-section}{sub-section:C6F58BD3-1D78-4C8B-A35C-B4EECC1E4943_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=A76F77B4-8B01-4C66-80F1-6537643924B6}{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:A76F77B4-8B01-4C66-80F1-6537643924B6_des|text=|trigger=button}{sub-section}{sub-section:A76F77B4-8B01-4C66-80F1-6537643924B6_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:A76F77B4-8B01-4C66-80F1-6537643924B6_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A76F77B4-8B01-4C66-80F1-6537643924B6_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A76F77B4-8B01-4C66-80F1-6537643924B6_ret|text=|trigger=button}{sub-section}{sub-section:A76F77B4-8B01-4C66-80F1-6537643924B6_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A76F77B4-8B01-4C66-80F1-6537643924B6_see|text=|trigger=button}{sub-section}{sub-section:A76F77B4-8B01-4C66-80F1-6537643924B6_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A76F77B4-8B01-4C66-80F1-6537643924B6_see|text=|trigger=button}{sub-section}{sub-section:A76F77B4-8B01-4C66-80F1-6537643924B6_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A76F77B4-8B01-4C66-80F1-6537643924B6_sam|text=|trigger=button}{sub-section}{sub-section:A76F77B4-8B01-4C66-80F1-6537643924B6_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=537D9AA5-204E-484E-AFA6-FF1CC8A7EBE2}{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:537D9AA5-204E-484E-AFA6-FF1CC8A7EBE2_des|text=|trigger=button}{sub-section}{sub-section:537D9AA5-204E-484E-AFA6-FF1CC8A7EBE2_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:537D9AA5-204E-484E-AFA6-FF1CC8A7EBE2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:537D9AA5-204E-484E-AFA6-FF1CC8A7EBE2_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:537D9AA5-204E-484E-AFA6-FF1CC8A7EBE2_ret|text=|trigger=button}{sub-section}{sub-section:537D9AA5-204E-484E-AFA6-FF1CC8A7EBE2_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:537D9AA5-204E-484E-AFA6-FF1CC8A7EBE2_see|text=|trigger=button}{sub-section}{sub-section:537D9AA5-204E-484E-AFA6-FF1CC8A7EBE2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:537D9AA5-204E-484E-AFA6-FF1CC8A7EBE2_see|text=|trigger=button}{sub-section}{sub-section:537D9AA5-204E-484E-AFA6-FF1CC8A7EBE2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:537D9AA5-204E-484E-AFA6-FF1CC8A7EBE2_sam|text=|trigger=button}{sub-section}{sub-section:537D9AA5-204E-484E-AFA6-FF1CC8A7EBE2_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=68FA9E52-0E45-4D12-97DA-C866A52B3901}{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:68FA9E52-0E45-4D12-97DA-C866A52B3901_des|text=|trigger=button}{sub-section}{sub-section:68FA9E52-0E45-4D12-97DA-C866A52B3901_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:68FA9E52-0E45-4D12-97DA-C866A52B3901_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:68FA9E52-0E45-4D12-97DA-C866A52B3901_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:68FA9E52-0E45-4D12-97DA-C866A52B3901_ret|text=|trigger=button}{sub-section}{sub-section:68FA9E52-0E45-4D12-97DA-C866A52B3901_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:68FA9E52-0E45-4D12-97DA-C866A52B3901_see|text=|trigger=button}{sub-section}{sub-section:68FA9E52-0E45-4D12-97DA-C866A52B3901_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:68FA9E52-0E45-4D12-97DA-C866A52B3901_see|text=|trigger=button}{sub-section}{sub-section:68FA9E52-0E45-4D12-97DA-C866A52B3901_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:68FA9E52-0E45-4D12-97DA-C866A52B3901_sam|text=|trigger=button}{sub-section}{sub-section:68FA9E52-0E45-4D12-97DA-C866A52B3901_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=8E723AEB-9A0B-47E5-A80A-C658BCE6E23A}{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:8E723AEB-9A0B-47E5-A80A-C658BCE6E23A_des|text=|trigger=button}{sub-section}{sub-section:8E723AEB-9A0B-47E5-A80A-C658BCE6E23A_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:8E723AEB-9A0B-47E5-A80A-C658BCE6E23A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8E723AEB-9A0B-47E5-A80A-C658BCE6E23A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:8E723AEB-9A0B-47E5-A80A-C658BCE6E23A_ret|text=|trigger=button}{sub-section}{sub-section:8E723AEB-9A0B-47E5-A80A-C658BCE6E23A_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8E723AEB-9A0B-47E5-A80A-C658BCE6E23A_see|text=|trigger=button}{sub-section}{sub-section:8E723AEB-9A0B-47E5-A80A-C658BCE6E23A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8E723AEB-9A0B-47E5-A80A-C658BCE6E23A_see|text=|trigger=button}{sub-section}{sub-section:8E723AEB-9A0B-47E5-A80A-C658BCE6E23A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8E723AEB-9A0B-47E5-A80A-C658BCE6E23A_sam|text=|trigger=button}{sub-section}{sub-section:8E723AEB-9A0B-47E5-A80A-C658BCE6E23A_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=8D30E845-F6F6-416D-8225-68B467DB6E0E}{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:8D30E845-F6F6-416D-8225-68B467DB6E0E_des|text=|trigger=button}{sub-section}{sub-section:8D30E845-F6F6-416D-8225-68B467DB6E0E_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:8D30E845-F6F6-416D-8225-68B467DB6E0E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8D30E845-F6F6-416D-8225-68B467DB6E0E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:8D30E845-F6F6-416D-8225-68B467DB6E0E_ret|text=|trigger=button}{sub-section}{sub-section:8D30E845-F6F6-416D-8225-68B467DB6E0E_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8D30E845-F6F6-416D-8225-68B467DB6E0E_see|text=|trigger=button}{sub-section}{sub-section:8D30E845-F6F6-416D-8225-68B467DB6E0E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8D30E845-F6F6-416D-8225-68B467DB6E0E_see|text=|trigger=button}{sub-section}{sub-section:8D30E845-F6F6-416D-8225-68B467DB6E0E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8D30E845-F6F6-416D-8225-68B467DB6E0E_sam|text=|trigger=button}{sub-section}{sub-section:8D30E845-F6F6-416D-8225-68B467DB6E0E_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=9A09CB1A-92BD-434E-A894-30C630FD7AC8}{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:9A09CB1A-92BD-434E-A894-30C630FD7AC8_des|text=|trigger=button}{sub-section}{sub-section:9A09CB1A-92BD-434E-A894-30C630FD7AC8_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:9A09CB1A-92BD-434E-A894-30C630FD7AC8_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9A09CB1A-92BD-434E-A894-30C630FD7AC8_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:9A09CB1A-92BD-434E-A894-30C630FD7AC8_ret|text=|trigger=button}{sub-section}{sub-section:9A09CB1A-92BD-434E-A894-30C630FD7AC8_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:9A09CB1A-92BD-434E-A894-30C630FD7AC8_see|text=|trigger=button}{sub-section}{sub-section:9A09CB1A-92BD-434E-A894-30C630FD7AC8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:9A09CB1A-92BD-434E-A894-30C630FD7AC8_see|text=|trigger=button}{sub-section}{sub-section:9A09CB1A-92BD-434E-A894-30C630FD7AC8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:9A09CB1A-92BD-434E-A894-30C630FD7AC8_sam|text=|trigger=button}{sub-section}{sub-section:9A09CB1A-92BD-434E-A894-30C630FD7AC8_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=E2540E9D-84DD-4DC5-A10E-FB0AA23DCE69}{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:E2540E9D-84DD-4DC5-A10E-FB0AA23DCE69_des|text=|trigger=button}{sub-section}{sub-section:E2540E9D-84DD-4DC5-A10E-FB0AA23DCE69_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:E2540E9D-84DD-4DC5-A10E-FB0AA23DCE69_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E2540E9D-84DD-4DC5-A10E-FB0AA23DCE69_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:E2540E9D-84DD-4DC5-A10E-FB0AA23DCE69_ret|text=|trigger=button}{sub-section}{sub-section:E2540E9D-84DD-4DC5-A10E-FB0AA23DCE69_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E2540E9D-84DD-4DC5-A10E-FB0AA23DCE69_see|text=|trigger=button}{sub-section}{sub-section:E2540E9D-84DD-4DC5-A10E-FB0AA23DCE69_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E2540E9D-84DD-4DC5-A10E-FB0AA23DCE69_see|text=|trigger=button}{sub-section}{sub-section:E2540E9D-84DD-4DC5-A10E-FB0AA23DCE69_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E2540E9D-84DD-4DC5-A10E-FB0AA23DCE69_sam|text=|trigger=button}{sub-section}{sub-section:E2540E9D-84DD-4DC5-A10E-FB0AA23DCE69_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=9174F5DB-8B12-4EC2-B5C3-947BBF4B2E8F}{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:9174F5DB-8B12-4EC2-B5C3-947BBF4B2E8F_des|text=|trigger=button}{sub-section}{sub-section:9174F5DB-8B12-4EC2-B5C3-947BBF4B2E8F_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:9174F5DB-8B12-4EC2-B5C3-947BBF4B2E8F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9174F5DB-8B12-4EC2-B5C3-947BBF4B2E8F_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:9174F5DB-8B12-4EC2-B5C3-947BBF4B2E8F_ret|text=|trigger=button}{sub-section}{sub-section:9174F5DB-8B12-4EC2-B5C3-947BBF4B2E8F_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:9174F5DB-8B12-4EC2-B5C3-947BBF4B2E8F_see|text=|trigger=button}{sub-section}{sub-section:9174F5DB-8B12-4EC2-B5C3-947BBF4B2E8F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:9174F5DB-8B12-4EC2-B5C3-947BBF4B2E8F_see|text=|trigger=button}{sub-section}{sub-section:9174F5DB-8B12-4EC2-B5C3-947BBF4B2E8F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:9174F5DB-8B12-4EC2-B5C3-947BBF4B2E8F_sam|text=|trigger=button}{sub-section}{sub-section:9174F5DB-8B12-4EC2-B5C3-947BBF4B2E8F_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=39DAAD27-C100-4338-9C89-143F400C6F6B}{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:39DAAD27-C100-4338-9C89-143F400C6F6B_des|text=|trigger=button}{sub-section}{sub-section:39DAAD27-C100-4338-9C89-143F400C6F6B_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:39DAAD27-C100-4338-9C89-143F400C6F6B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:39DAAD27-C100-4338-9C89-143F400C6F6B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:39DAAD27-C100-4338-9C89-143F400C6F6B_ret|text=|trigger=button}{sub-section}{sub-section:39DAAD27-C100-4338-9C89-143F400C6F6B_ret|trigger=none|class=sIndent}[Date]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:39DAAD27-C100-4338-9C89-143F400C6F6B_see|text=|trigger=button}{sub-section}{sub-section:39DAAD27-C100-4338-9C89-143F400C6F6B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:39DAAD27-C100-4338-9C89-143F400C6F6B_see|text=|trigger=button}{sub-section}{sub-section:39DAAD27-C100-4338-9C89-143F400C6F6B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:39DAAD27-C100-4338-9C89-143F400C6F6B_sam|text=|trigger=button}{sub-section}{sub-section:39DAAD27-C100-4338-9C89-143F400C6F6B_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=B3BF8487-605B-4EC4-B19F-01E238BBC53C}{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:B3BF8487-605B-4EC4-B19F-01E238BBC53C_des|text=|trigger=button}{sub-section}{sub-section:B3BF8487-605B-4EC4-B19F-01E238BBC53C_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:B3BF8487-605B-4EC4-B19F-01E238BBC53C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B3BF8487-605B-4EC4-B19F-01E238BBC53C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:B3BF8487-605B-4EC4-B19F-01E238BBC53C_ret|text=|trigger=button}{sub-section}{sub-section:B3BF8487-605B-4EC4-B19F-01E238BBC53C_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B3BF8487-605B-4EC4-B19F-01E238BBC53C_see|text=|trigger=button}{sub-section}{sub-section:B3BF8487-605B-4EC4-B19F-01E238BBC53C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B3BF8487-605B-4EC4-B19F-01E238BBC53C_see|text=|trigger=button}{sub-section}{sub-section:B3BF8487-605B-4EC4-B19F-01E238BBC53C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B3BF8487-605B-4EC4-B19F-01E238BBC53C_sam|text=|trigger=button}{sub-section}{sub-section:B3BF8487-605B-4EC4-B19F-01E238BBC53C_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=089A0F5B-8B34-4B2B-A3A0-F3F42E0B4646}{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:089A0F5B-8B34-4B2B-A3A0-F3F42E0B4646_des|text=|trigger=button}{sub-section}{sub-section:089A0F5B-8B34-4B2B-A3A0-F3F42E0B4646_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:089A0F5B-8B34-4B2B-A3A0-F3F42E0B4646_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:089A0F5B-8B34-4B2B-A3A0-F3F42E0B4646_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:089A0F5B-8B34-4B2B-A3A0-F3F42E0B4646_ret|text=|trigger=button}{sub-section}{sub-section:089A0F5B-8B34-4B2B-A3A0-F3F42E0B4646_ret|trigger=none|class=sIndent}[JSFile]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:089A0F5B-8B34-4B2B-A3A0-F3F42E0B4646_see|text=|trigger=button}{sub-section}{sub-section:089A0F5B-8B34-4B2B-A3A0-F3F42E0B4646_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:089A0F5B-8B34-4B2B-A3A0-F3F42E0B4646_see|text=|trigger=button}{sub-section}{sub-section:089A0F5B-8B34-4B2B-A3A0-F3F42E0B4646_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:089A0F5B-8B34-4B2B-A3A0-F3F42E0B4646_sam|text=|trigger=button}{sub-section}{sub-section:089A0F5B-8B34-4B2B-A3A0-F3F42E0B4646_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=8C9EAACE-5311-43C2-AF46-0B5F0BA15613}{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:8C9EAACE-5311-43C2-AF46-0B5F0BA15613_des|text=|trigger=button}{sub-section}{sub-section:8C9EAACE-5311-43C2-AF46-0B5F0BA15613_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:8C9EAACE-5311-43C2-AF46-0B5F0BA15613_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8C9EAACE-5311-43C2-AF46-0B5F0BA15613_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:8C9EAACE-5311-43C2-AF46-0B5F0BA15613_ret|text=|trigger=button}{sub-section}{sub-section:8C9EAACE-5311-43C2-AF46-0B5F0BA15613_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8C9EAACE-5311-43C2-AF46-0B5F0BA15613_see|text=|trigger=button}{sub-section}{sub-section:8C9EAACE-5311-43C2-AF46-0B5F0BA15613_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8C9EAACE-5311-43C2-AF46-0B5F0BA15613_see|text=|trigger=button}{sub-section}{sub-section:8C9EAACE-5311-43C2-AF46-0B5F0BA15613_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8C9EAACE-5311-43C2-AF46-0B5F0BA15613_sam|text=|trigger=button}{sub-section}{sub-section:8C9EAACE-5311-43C2-AF46-0B5F0BA15613_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=12BE700B-1F9A-4C6F-BB3C-D2ABDF5A23F7}{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:12BE700B-1F9A-4C6F-BB3C-D2ABDF5A23F7_des|text=|trigger=button}{sub-section}{sub-section:12BE700B-1F9A-4C6F-BB3C-D2ABDF5A23F7_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:12BE700B-1F9A-4C6F-BB3C-D2ABDF5A23F7_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:12BE700B-1F9A-4C6F-BB3C-D2ABDF5A23F7_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:12BE700B-1F9A-4C6F-BB3C-D2ABDF5A23F7_ret|text=|trigger=button}{sub-section}{sub-section:12BE700B-1F9A-4C6F-BB3C-D2ABDF5A23F7_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:12BE700B-1F9A-4C6F-BB3C-D2ABDF5A23F7_see|text=|trigger=button}{sub-section}{sub-section:12BE700B-1F9A-4C6F-BB3C-D2ABDF5A23F7_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:12BE700B-1F9A-4C6F-BB3C-D2ABDF5A23F7_see|text=|trigger=button}{sub-section}{sub-section:12BE700B-1F9A-4C6F-BB3C-D2ABDF5A23F7_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:12BE700B-1F9A-4C6F-BB3C-D2ABDF5A23F7_sam|text=|trigger=button}{sub-section}{sub-section:12BE700B-1F9A-4C6F-BB3C-D2ABDF5A23F7_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=D1C06E64-BCAC-4C96-8960-CB8605EE902C}{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:D1C06E64-BCAC-4C96-8960-CB8605EE902C_des|text=|trigger=button}{sub-section}{sub-section:D1C06E64-BCAC-4C96-8960-CB8605EE902C_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:D1C06E64-BCAC-4C96-8960-CB8605EE902C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D1C06E64-BCAC-4C96-8960-CB8605EE902C_prs|trigger=none}destination
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:D1C06E64-BCAC-4C96-8960-CB8605EE902C_ret|text=|trigger=button}{sub-section}{sub-section:D1C06E64-BCAC-4C96-8960-CB8605EE902C_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D1C06E64-BCAC-4C96-8960-CB8605EE902C_see|text=|trigger=button}{sub-section}{sub-section:D1C06E64-BCAC-4C96-8960-CB8605EE902C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D1C06E64-BCAC-4C96-8960-CB8605EE902C_see|text=|trigger=button}{sub-section}{sub-section:D1C06E64-BCAC-4C96-8960-CB8605EE902C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D1C06E64-BCAC-4C96-8960-CB8605EE902C_sam|text=|trigger=button}{sub-section}{sub-section:D1C06E64-BCAC-4C96-8960-CB8605EE902C_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=8F75FDE7-30C6-496C-9FA0-AC740388AE82}{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:8F75FDE7-30C6-496C-9FA0-AC740388AE82_des|text=|trigger=button}{sub-section}{sub-section:8F75FDE7-30C6-496C-9FA0-AC740388AE82_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:8F75FDE7-30C6-496C-9FA0-AC740388AE82_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8F75FDE7-30C6-496C-9FA0-AC740388AE82_prs|trigger=none}date
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:8F75FDE7-30C6-496C-9FA0-AC740388AE82_ret|text=|trigger=button}{sub-section}{sub-section:8F75FDE7-30C6-496C-9FA0-AC740388AE82_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8F75FDE7-30C6-496C-9FA0-AC740388AE82_see|text=|trigger=button}{sub-section}{sub-section:8F75FDE7-30C6-496C-9FA0-AC740388AE82_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8F75FDE7-30C6-496C-9FA0-AC740388AE82_see|text=|trigger=button}{sub-section}{sub-section:8F75FDE7-30C6-496C-9FA0-AC740388AE82_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8F75FDE7-30C6-496C-9FA0-AC740388AE82_sam|text=|trigger=button}{sub-section}{sub-section:8F75FDE7-30C6-496C-9FA0-AC740388AE82_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=D1AE9FB6-329F-46EB-BA38-27AAD0E891D8}{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:D1AE9FB6-329F-46EB-BA38-27AAD0E891D8_des|text=|trigger=button}{sub-section}{sub-section:D1AE9FB6-329F-46EB-BA38-27AAD0E891D8_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:D1AE9FB6-329F-46EB-BA38-27AAD0E891D8_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D1AE9FB6-329F-46EB-BA38-27AAD0E891D8_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D1AE9FB6-329F-46EB-BA38-27AAD0E891D8_ret|text=|trigger=button}{sub-section}{sub-section:D1AE9FB6-329F-46EB-BA38-27AAD0E891D8_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D1AE9FB6-329F-46EB-BA38-27AAD0E891D8_see|text=|trigger=button}{sub-section}{sub-section:D1AE9FB6-329F-46EB-BA38-27AAD0E891D8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D1AE9FB6-329F-46EB-BA38-27AAD0E891D8_see|text=|trigger=button}{sub-section}{sub-section:D1AE9FB6-329F-46EB-BA38-27AAD0E891D8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D1AE9FB6-329F-46EB-BA38-27AAD0E891D8_sam|text=|trigger=button}{sub-section}{sub-section:D1AE9FB6-329F-46EB-BA38-27AAD0E891D8_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=91744863-49CF-4476-809C-724B14C1E8E8}{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:91744863-49CF-4476-809C-724B14C1E8E8_des|text=|trigger=button}{sub-section}{sub-section:91744863-49CF-4476-809C-724B14C1E8E8_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:91744863-49CF-4476-809C-724B14C1E8E8_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:91744863-49CF-4476-809C-724B14C1E8E8_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:91744863-49CF-4476-809C-724B14C1E8E8_ret|text=|trigger=button}{sub-section}{sub-section:91744863-49CF-4476-809C-724B14C1E8E8_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:91744863-49CF-4476-809C-724B14C1E8E8_see|text=|trigger=button}{sub-section}{sub-section:91744863-49CF-4476-809C-724B14C1E8E8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:91744863-49CF-4476-809C-724B14C1E8E8_see|text=|trigger=button}{sub-section}{sub-section:91744863-49CF-4476-809C-724B14C1E8E8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:91744863-49CF-4476-809C-724B14C1E8E8_sam|text=|trigger=button}{sub-section}{sub-section:91744863-49CF-4476-809C-724B14C1E8E8_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}