{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=5EF02046-806F-46B9-BBAE-99268EBCF081}{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:5EF02046-806F-46B9-BBAE-99268EBCF081_des|text=|trigger=button}{sub-section}{sub-section:5EF02046-806F-46B9-BBAE-99268EBCF081_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:5EF02046-806F-46B9-BBAE-99268EBCF081_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5EF02046-806F-46B9-BBAE-99268EBCF081_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:5EF02046-806F-46B9-BBAE-99268EBCF081_ret|text=|trigger=button}{sub-section}{sub-section:5EF02046-806F-46B9-BBAE-99268EBCF081_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5EF02046-806F-46B9-BBAE-99268EBCF081_see|text=|trigger=button}{sub-section}{sub-section:5EF02046-806F-46B9-BBAE-99268EBCF081_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5EF02046-806F-46B9-BBAE-99268EBCF081_see|text=|trigger=button}{sub-section}{sub-section:5EF02046-806F-46B9-BBAE-99268EBCF081_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5EF02046-806F-46B9-BBAE-99268EBCF081_sam|text=|trigger=button}{sub-section}{sub-section:5EF02046-806F-46B9-BBAE-99268EBCF081_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=362F31A9-D325-4180-A22A-E3C466CFC886}{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:362F31A9-D325-4180-A22A-E3C466CFC886_des|text=|trigger=button}{sub-section}{sub-section:362F31A9-D325-4180-A22A-E3C466CFC886_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:362F31A9-D325-4180-A22A-E3C466CFC886_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:362F31A9-D325-4180-A22A-E3C466CFC886_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:362F31A9-D325-4180-A22A-E3C466CFC886_ret|text=|trigger=button}{sub-section}{sub-section:362F31A9-D325-4180-A22A-E3C466CFC886_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:362F31A9-D325-4180-A22A-E3C466CFC886_see|text=|trigger=button}{sub-section}{sub-section:362F31A9-D325-4180-A22A-E3C466CFC886_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:362F31A9-D325-4180-A22A-E3C466CFC886_see|text=|trigger=button}{sub-section}{sub-section:362F31A9-D325-4180-A22A-E3C466CFC886_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:362F31A9-D325-4180-A22A-E3C466CFC886_sam|text=|trigger=button}{sub-section}{sub-section:362F31A9-D325-4180-A22A-E3C466CFC886_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=64BC8351-D75B-461C-B0A0-2E67EDD2D8CF}{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:64BC8351-D75B-461C-B0A0-2E67EDD2D8CF_des|text=|trigger=button}{sub-section}{sub-section:64BC8351-D75B-461C-B0A0-2E67EDD2D8CF_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:64BC8351-D75B-461C-B0A0-2E67EDD2D8CF_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:64BC8351-D75B-461C-B0A0-2E67EDD2D8CF_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:64BC8351-D75B-461C-B0A0-2E67EDD2D8CF_ret|text=|trigger=button}{sub-section}{sub-section:64BC8351-D75B-461C-B0A0-2E67EDD2D8CF_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:64BC8351-D75B-461C-B0A0-2E67EDD2D8CF_see|text=|trigger=button}{sub-section}{sub-section:64BC8351-D75B-461C-B0A0-2E67EDD2D8CF_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:64BC8351-D75B-461C-B0A0-2E67EDD2D8CF_see|text=|trigger=button}{sub-section}{sub-section:64BC8351-D75B-461C-B0A0-2E67EDD2D8CF_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:64BC8351-D75B-461C-B0A0-2E67EDD2D8CF_sam|text=|trigger=button}{sub-section}{sub-section:64BC8351-D75B-461C-B0A0-2E67EDD2D8CF_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=A0F1F47C-6136-4FE2-858A-AE1275FCE51B}{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:A0F1F47C-6136-4FE2-858A-AE1275FCE51B_des|text=|trigger=button}{sub-section}{sub-section:A0F1F47C-6136-4FE2-858A-AE1275FCE51B_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:A0F1F47C-6136-4FE2-858A-AE1275FCE51B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A0F1F47C-6136-4FE2-858A-AE1275FCE51B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A0F1F47C-6136-4FE2-858A-AE1275FCE51B_ret|text=|trigger=button}{sub-section}{sub-section:A0F1F47C-6136-4FE2-858A-AE1275FCE51B_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A0F1F47C-6136-4FE2-858A-AE1275FCE51B_see|text=|trigger=button}{sub-section}{sub-section:A0F1F47C-6136-4FE2-858A-AE1275FCE51B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A0F1F47C-6136-4FE2-858A-AE1275FCE51B_see|text=|trigger=button}{sub-section}{sub-section:A0F1F47C-6136-4FE2-858A-AE1275FCE51B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A0F1F47C-6136-4FE2-858A-AE1275FCE51B_sam|text=|trigger=button}{sub-section}{sub-section:A0F1F47C-6136-4FE2-858A-AE1275FCE51B_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=1025F4A1-562D-48CD-A57E-0A0E256D335C}{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:1025F4A1-562D-48CD-A57E-0A0E256D335C_des|text=|trigger=button}{sub-section}{sub-section:1025F4A1-562D-48CD-A57E-0A0E256D335C_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:1025F4A1-562D-48CD-A57E-0A0E256D335C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1025F4A1-562D-48CD-A57E-0A0E256D335C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:1025F4A1-562D-48CD-A57E-0A0E256D335C_ret|text=|trigger=button}{sub-section}{sub-section:1025F4A1-562D-48CD-A57E-0A0E256D335C_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1025F4A1-562D-48CD-A57E-0A0E256D335C_see|text=|trigger=button}{sub-section}{sub-section:1025F4A1-562D-48CD-A57E-0A0E256D335C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1025F4A1-562D-48CD-A57E-0A0E256D335C_see|text=|trigger=button}{sub-section}{sub-section:1025F4A1-562D-48CD-A57E-0A0E256D335C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1025F4A1-562D-48CD-A57E-0A0E256D335C_sam|text=|trigger=button}{sub-section}{sub-section:1025F4A1-562D-48CD-A57E-0A0E256D335C_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=FECDBA7B-FC14-4BDE-ADDA-327CB3244A8B}{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:FECDBA7B-FC14-4BDE-ADDA-327CB3244A8B_des|text=|trigger=button}{sub-section}{sub-section:FECDBA7B-FC14-4BDE-ADDA-327CB3244A8B_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:FECDBA7B-FC14-4BDE-ADDA-327CB3244A8B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FECDBA7B-FC14-4BDE-ADDA-327CB3244A8B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:FECDBA7B-FC14-4BDE-ADDA-327CB3244A8B_ret|text=|trigger=button}{sub-section}{sub-section:FECDBA7B-FC14-4BDE-ADDA-327CB3244A8B_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FECDBA7B-FC14-4BDE-ADDA-327CB3244A8B_see|text=|trigger=button}{sub-section}{sub-section:FECDBA7B-FC14-4BDE-ADDA-327CB3244A8B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FECDBA7B-FC14-4BDE-ADDA-327CB3244A8B_see|text=|trigger=button}{sub-section}{sub-section:FECDBA7B-FC14-4BDE-ADDA-327CB3244A8B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FECDBA7B-FC14-4BDE-ADDA-327CB3244A8B_sam|text=|trigger=button}{sub-section}{sub-section:FECDBA7B-FC14-4BDE-ADDA-327CB3244A8B_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=A15D5379-868B-4627-99EE-2A2391297763}{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:A15D5379-868B-4627-99EE-2A2391297763_des|text=|trigger=button}{sub-section}{sub-section:A15D5379-868B-4627-99EE-2A2391297763_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:A15D5379-868B-4627-99EE-2A2391297763_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A15D5379-868B-4627-99EE-2A2391297763_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A15D5379-868B-4627-99EE-2A2391297763_ret|text=|trigger=button}{sub-section}{sub-section:A15D5379-868B-4627-99EE-2A2391297763_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A15D5379-868B-4627-99EE-2A2391297763_see|text=|trigger=button}{sub-section}{sub-section:A15D5379-868B-4627-99EE-2A2391297763_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A15D5379-868B-4627-99EE-2A2391297763_see|text=|trigger=button}{sub-section}{sub-section:A15D5379-868B-4627-99EE-2A2391297763_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A15D5379-868B-4627-99EE-2A2391297763_sam|text=|trigger=button}{sub-section}{sub-section:A15D5379-868B-4627-99EE-2A2391297763_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=D23EB6FE-315B-4747-A726-18A25AE42323}{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:D23EB6FE-315B-4747-A726-18A25AE42323_des|text=|trigger=button}{sub-section}{sub-section:D23EB6FE-315B-4747-A726-18A25AE42323_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:D23EB6FE-315B-4747-A726-18A25AE42323_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D23EB6FE-315B-4747-A726-18A25AE42323_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D23EB6FE-315B-4747-A726-18A25AE42323_ret|text=|trigger=button}{sub-section}{sub-section:D23EB6FE-315B-4747-A726-18A25AE42323_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D23EB6FE-315B-4747-A726-18A25AE42323_see|text=|trigger=button}{sub-section}{sub-section:D23EB6FE-315B-4747-A726-18A25AE42323_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D23EB6FE-315B-4747-A726-18A25AE42323_see|text=|trigger=button}{sub-section}{sub-section:D23EB6FE-315B-4747-A726-18A25AE42323_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D23EB6FE-315B-4747-A726-18A25AE42323_sam|text=|trigger=button}{sub-section}{sub-section:D23EB6FE-315B-4747-A726-18A25AE42323_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=B423199B-6014-494A-8F5C-561B71A8D88B}{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:B423199B-6014-494A-8F5C-561B71A8D88B_des|text=|trigger=button}{sub-section}{sub-section:B423199B-6014-494A-8F5C-561B71A8D88B_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:B423199B-6014-494A-8F5C-561B71A8D88B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B423199B-6014-494A-8F5C-561B71A8D88B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:B423199B-6014-494A-8F5C-561B71A8D88B_ret|text=|trigger=button}{sub-section}{sub-section:B423199B-6014-494A-8F5C-561B71A8D88B_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B423199B-6014-494A-8F5C-561B71A8D88B_see|text=|trigger=button}{sub-section}{sub-section:B423199B-6014-494A-8F5C-561B71A8D88B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B423199B-6014-494A-8F5C-561B71A8D88B_see|text=|trigger=button}{sub-section}{sub-section:B423199B-6014-494A-8F5C-561B71A8D88B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B423199B-6014-494A-8F5C-561B71A8D88B_sam|text=|trigger=button}{sub-section}{sub-section:B423199B-6014-494A-8F5C-561B71A8D88B_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=765071F2-6795-4DD9-8022-7A2F399F27A1}{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:765071F2-6795-4DD9-8022-7A2F399F27A1_des|text=|trigger=button}{sub-section}{sub-section:765071F2-6795-4DD9-8022-7A2F399F27A1_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:765071F2-6795-4DD9-8022-7A2F399F27A1_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:765071F2-6795-4DD9-8022-7A2F399F27A1_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:765071F2-6795-4DD9-8022-7A2F399F27A1_ret|text=|trigger=button}{sub-section}{sub-section:765071F2-6795-4DD9-8022-7A2F399F27A1_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:765071F2-6795-4DD9-8022-7A2F399F27A1_see|text=|trigger=button}{sub-section}{sub-section:765071F2-6795-4DD9-8022-7A2F399F27A1_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:765071F2-6795-4DD9-8022-7A2F399F27A1_see|text=|trigger=button}{sub-section}{sub-section:765071F2-6795-4DD9-8022-7A2F399F27A1_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:765071F2-6795-4DD9-8022-7A2F399F27A1_sam|text=|trigger=button}{sub-section}{sub-section:765071F2-6795-4DD9-8022-7A2F399F27A1_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=FEF9C3AF-E74D-4EAE-84D4-B0A780A5981E}{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:FEF9C3AF-E74D-4EAE-84D4-B0A780A5981E_des|text=|trigger=button}{sub-section}{sub-section:FEF9C3AF-E74D-4EAE-84D4-B0A780A5981E_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:FEF9C3AF-E74D-4EAE-84D4-B0A780A5981E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FEF9C3AF-E74D-4EAE-84D4-B0A780A5981E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:FEF9C3AF-E74D-4EAE-84D4-B0A780A5981E_ret|text=|trigger=button}{sub-section}{sub-section:FEF9C3AF-E74D-4EAE-84D4-B0A780A5981E_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FEF9C3AF-E74D-4EAE-84D4-B0A780A5981E_see|text=|trigger=button}{sub-section}{sub-section:FEF9C3AF-E74D-4EAE-84D4-B0A780A5981E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FEF9C3AF-E74D-4EAE-84D4-B0A780A5981E_see|text=|trigger=button}{sub-section}{sub-section:FEF9C3AF-E74D-4EAE-84D4-B0A780A5981E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FEF9C3AF-E74D-4EAE-84D4-B0A780A5981E_sam|text=|trigger=button}{sub-section}{sub-section:FEF9C3AF-E74D-4EAE-84D4-B0A780A5981E_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=BFD2B932-95BF-48F9-A781-F82C27E3555E}{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:BFD2B932-95BF-48F9-A781-F82C27E3555E_des|text=|trigger=button}{sub-section}{sub-section:BFD2B932-95BF-48F9-A781-F82C27E3555E_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:BFD2B932-95BF-48F9-A781-F82C27E3555E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BFD2B932-95BF-48F9-A781-F82C27E3555E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:BFD2B932-95BF-48F9-A781-F82C27E3555E_ret|text=|trigger=button}{sub-section}{sub-section:BFD2B932-95BF-48F9-A781-F82C27E3555E_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BFD2B932-95BF-48F9-A781-F82C27E3555E_see|text=|trigger=button}{sub-section}{sub-section:BFD2B932-95BF-48F9-A781-F82C27E3555E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BFD2B932-95BF-48F9-A781-F82C27E3555E_see|text=|trigger=button}{sub-section}{sub-section:BFD2B932-95BF-48F9-A781-F82C27E3555E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BFD2B932-95BF-48F9-A781-F82C27E3555E_sam|text=|trigger=button}{sub-section}{sub-section:BFD2B932-95BF-48F9-A781-F82C27E3555E_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=78C87AEC-D8AB-490C-8B8C-96629F54FB6B}{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:78C87AEC-D8AB-490C-8B8C-96629F54FB6B_des|text=|trigger=button}{sub-section}{sub-section:78C87AEC-D8AB-490C-8B8C-96629F54FB6B_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:78C87AEC-D8AB-490C-8B8C-96629F54FB6B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:78C87AEC-D8AB-490C-8B8C-96629F54FB6B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:78C87AEC-D8AB-490C-8B8C-96629F54FB6B_ret|text=|trigger=button}{sub-section}{sub-section:78C87AEC-D8AB-490C-8B8C-96629F54FB6B_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:78C87AEC-D8AB-490C-8B8C-96629F54FB6B_see|text=|trigger=button}{sub-section}{sub-section:78C87AEC-D8AB-490C-8B8C-96629F54FB6B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:78C87AEC-D8AB-490C-8B8C-96629F54FB6B_see|text=|trigger=button}{sub-section}{sub-section:78C87AEC-D8AB-490C-8B8C-96629F54FB6B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:78C87AEC-D8AB-490C-8B8C-96629F54FB6B_sam|text=|trigger=button}{sub-section}{sub-section:78C87AEC-D8AB-490C-8B8C-96629F54FB6B_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=597611F7-982C-46B4-877A-28A0D633C612}{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:597611F7-982C-46B4-877A-28A0D633C612_des|text=|trigger=button}{sub-section}{sub-section:597611F7-982C-46B4-877A-28A0D633C612_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:597611F7-982C-46B4-877A-28A0D633C612_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:597611F7-982C-46B4-877A-28A0D633C612_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:597611F7-982C-46B4-877A-28A0D633C612_ret|text=|trigger=button}{sub-section}{sub-section:597611F7-982C-46B4-877A-28A0D633C612_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:597611F7-982C-46B4-877A-28A0D633C612_see|text=|trigger=button}{sub-section}{sub-section:597611F7-982C-46B4-877A-28A0D633C612_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:597611F7-982C-46B4-877A-28A0D633C612_see|text=|trigger=button}{sub-section}{sub-section:597611F7-982C-46B4-877A-28A0D633C612_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:597611F7-982C-46B4-877A-28A0D633C612_sam|text=|trigger=button}{sub-section}{sub-section:597611F7-982C-46B4-877A-28A0D633C612_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=2A3B385A-0D4B-4895-8215-C1149E5A10BD}{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:2A3B385A-0D4B-4895-8215-C1149E5A10BD_des|text=|trigger=button}{sub-section}{sub-section:2A3B385A-0D4B-4895-8215-C1149E5A10BD_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:2A3B385A-0D4B-4895-8215-C1149E5A10BD_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2A3B385A-0D4B-4895-8215-C1149E5A10BD_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:2A3B385A-0D4B-4895-8215-C1149E5A10BD_ret|text=|trigger=button}{sub-section}{sub-section:2A3B385A-0D4B-4895-8215-C1149E5A10BD_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2A3B385A-0D4B-4895-8215-C1149E5A10BD_see|text=|trigger=button}{sub-section}{sub-section:2A3B385A-0D4B-4895-8215-C1149E5A10BD_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2A3B385A-0D4B-4895-8215-C1149E5A10BD_see|text=|trigger=button}{sub-section}{sub-section:2A3B385A-0D4B-4895-8215-C1149E5A10BD_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2A3B385A-0D4B-4895-8215-C1149E5A10BD_sam|text=|trigger=button}{sub-section}{sub-section:2A3B385A-0D4B-4895-8215-C1149E5A10BD_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=C4C6E854-08BC-4B67-B86D-E5708EF28FDA}{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:C4C6E854-08BC-4B67-B86D-E5708EF28FDA_des|text=|trigger=button}{sub-section}{sub-section:C4C6E854-08BC-4B67-B86D-E5708EF28FDA_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:C4C6E854-08BC-4B67-B86D-E5708EF28FDA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C4C6E854-08BC-4B67-B86D-E5708EF28FDA_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C4C6E854-08BC-4B67-B86D-E5708EF28FDA_ret|text=|trigger=button}{sub-section}{sub-section:C4C6E854-08BC-4B67-B86D-E5708EF28FDA_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C4C6E854-08BC-4B67-B86D-E5708EF28FDA_see|text=|trigger=button}{sub-section}{sub-section:C4C6E854-08BC-4B67-B86D-E5708EF28FDA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C4C6E854-08BC-4B67-B86D-E5708EF28FDA_see|text=|trigger=button}{sub-section}{sub-section:C4C6E854-08BC-4B67-B86D-E5708EF28FDA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C4C6E854-08BC-4B67-B86D-E5708EF28FDA_sam|text=|trigger=button}{sub-section}{sub-section:C4C6E854-08BC-4B67-B86D-E5708EF28FDA_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=11F9A281-8199-442D-B598-331DCE9FF51C}{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:11F9A281-8199-442D-B598-331DCE9FF51C_des|text=|trigger=button}{sub-section}{sub-section:11F9A281-8199-442D-B598-331DCE9FF51C_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:11F9A281-8199-442D-B598-331DCE9FF51C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:11F9A281-8199-442D-B598-331DCE9FF51C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:11F9A281-8199-442D-B598-331DCE9FF51C_ret|text=|trigger=button}{sub-section}{sub-section:11F9A281-8199-442D-B598-331DCE9FF51C_ret|trigger=none|class=sIndent}[Date]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:11F9A281-8199-442D-B598-331DCE9FF51C_see|text=|trigger=button}{sub-section}{sub-section:11F9A281-8199-442D-B598-331DCE9FF51C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:11F9A281-8199-442D-B598-331DCE9FF51C_see|text=|trigger=button}{sub-section}{sub-section:11F9A281-8199-442D-B598-331DCE9FF51C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:11F9A281-8199-442D-B598-331DCE9FF51C_sam|text=|trigger=button}{sub-section}{sub-section:11F9A281-8199-442D-B598-331DCE9FF51C_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=968EB987-49DC-4D33-8B7F-F107FAA4D56D}{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:968EB987-49DC-4D33-8B7F-F107FAA4D56D_des|text=|trigger=button}{sub-section}{sub-section:968EB987-49DC-4D33-8B7F-F107FAA4D56D_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:968EB987-49DC-4D33-8B7F-F107FAA4D56D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:968EB987-49DC-4D33-8B7F-F107FAA4D56D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:968EB987-49DC-4D33-8B7F-F107FAA4D56D_ret|text=|trigger=button}{sub-section}{sub-section:968EB987-49DC-4D33-8B7F-F107FAA4D56D_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:968EB987-49DC-4D33-8B7F-F107FAA4D56D_see|text=|trigger=button}{sub-section}{sub-section:968EB987-49DC-4D33-8B7F-F107FAA4D56D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:968EB987-49DC-4D33-8B7F-F107FAA4D56D_see|text=|trigger=button}{sub-section}{sub-section:968EB987-49DC-4D33-8B7F-F107FAA4D56D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:968EB987-49DC-4D33-8B7F-F107FAA4D56D_sam|text=|trigger=button}{sub-section}{sub-section:968EB987-49DC-4D33-8B7F-F107FAA4D56D_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=BA63F0C1-69F3-485D-A446-1A65920E01FA}{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:BA63F0C1-69F3-485D-A446-1A65920E01FA_des|text=|trigger=button}{sub-section}{sub-section:BA63F0C1-69F3-485D-A446-1A65920E01FA_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:BA63F0C1-69F3-485D-A446-1A65920E01FA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BA63F0C1-69F3-485D-A446-1A65920E01FA_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:BA63F0C1-69F3-485D-A446-1A65920E01FA_ret|text=|trigger=button}{sub-section}{sub-section:BA63F0C1-69F3-485D-A446-1A65920E01FA_ret|trigger=none|class=sIndent}[JSFile]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BA63F0C1-69F3-485D-A446-1A65920E01FA_see|text=|trigger=button}{sub-section}{sub-section:BA63F0C1-69F3-485D-A446-1A65920E01FA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BA63F0C1-69F3-485D-A446-1A65920E01FA_see|text=|trigger=button}{sub-section}{sub-section:BA63F0C1-69F3-485D-A446-1A65920E01FA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BA63F0C1-69F3-485D-A446-1A65920E01FA_sam|text=|trigger=button}{sub-section}{sub-section:BA63F0C1-69F3-485D-A446-1A65920E01FA_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=16AE6189-3E7D-4757-87FB-83290256CC78}{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:16AE6189-3E7D-4757-87FB-83290256CC78_des|text=|trigger=button}{sub-section}{sub-section:16AE6189-3E7D-4757-87FB-83290256CC78_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:16AE6189-3E7D-4757-87FB-83290256CC78_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:16AE6189-3E7D-4757-87FB-83290256CC78_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:16AE6189-3E7D-4757-87FB-83290256CC78_ret|text=|trigger=button}{sub-section}{sub-section:16AE6189-3E7D-4757-87FB-83290256CC78_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:16AE6189-3E7D-4757-87FB-83290256CC78_see|text=|trigger=button}{sub-section}{sub-section:16AE6189-3E7D-4757-87FB-83290256CC78_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:16AE6189-3E7D-4757-87FB-83290256CC78_see|text=|trigger=button}{sub-section}{sub-section:16AE6189-3E7D-4757-87FB-83290256CC78_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:16AE6189-3E7D-4757-87FB-83290256CC78_sam|text=|trigger=button}{sub-section}{sub-section:16AE6189-3E7D-4757-87FB-83290256CC78_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=E13369E0-FAAD-4CD8-9608-8BA06D3EB56D}{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:E13369E0-FAAD-4CD8-9608-8BA06D3EB56D_des|text=|trigger=button}{sub-section}{sub-section:E13369E0-FAAD-4CD8-9608-8BA06D3EB56D_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:E13369E0-FAAD-4CD8-9608-8BA06D3EB56D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E13369E0-FAAD-4CD8-9608-8BA06D3EB56D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:E13369E0-FAAD-4CD8-9608-8BA06D3EB56D_ret|text=|trigger=button}{sub-section}{sub-section:E13369E0-FAAD-4CD8-9608-8BA06D3EB56D_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E13369E0-FAAD-4CD8-9608-8BA06D3EB56D_see|text=|trigger=button}{sub-section}{sub-section:E13369E0-FAAD-4CD8-9608-8BA06D3EB56D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E13369E0-FAAD-4CD8-9608-8BA06D3EB56D_see|text=|trigger=button}{sub-section}{sub-section:E13369E0-FAAD-4CD8-9608-8BA06D3EB56D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E13369E0-FAAD-4CD8-9608-8BA06D3EB56D_sam|text=|trigger=button}{sub-section}{sub-section:E13369E0-FAAD-4CD8-9608-8BA06D3EB56D_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=4F49E5F1-994B-445E-BDA0-8942E2542803}{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:4F49E5F1-994B-445E-BDA0-8942E2542803_des|text=|trigger=button}{sub-section}{sub-section:4F49E5F1-994B-445E-BDA0-8942E2542803_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:4F49E5F1-994B-445E-BDA0-8942E2542803_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4F49E5F1-994B-445E-BDA0-8942E2542803_prs|trigger=none}destination
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:4F49E5F1-994B-445E-BDA0-8942E2542803_ret|text=|trigger=button}{sub-section}{sub-section:4F49E5F1-994B-445E-BDA0-8942E2542803_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4F49E5F1-994B-445E-BDA0-8942E2542803_see|text=|trigger=button}{sub-section}{sub-section:4F49E5F1-994B-445E-BDA0-8942E2542803_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4F49E5F1-994B-445E-BDA0-8942E2542803_see|text=|trigger=button}{sub-section}{sub-section:4F49E5F1-994B-445E-BDA0-8942E2542803_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4F49E5F1-994B-445E-BDA0-8942E2542803_sam|text=|trigger=button}{sub-section}{sub-section:4F49E5F1-994B-445E-BDA0-8942E2542803_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=4BB2FA45-DDA8-487E-A47A-20881931BABF}{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:4BB2FA45-DDA8-487E-A47A-20881931BABF_des|text=|trigger=button}{sub-section}{sub-section:4BB2FA45-DDA8-487E-A47A-20881931BABF_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:4BB2FA45-DDA8-487E-A47A-20881931BABF_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4BB2FA45-DDA8-487E-A47A-20881931BABF_prs|trigger=none}date
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:4BB2FA45-DDA8-487E-A47A-20881931BABF_ret|text=|trigger=button}{sub-section}{sub-section:4BB2FA45-DDA8-487E-A47A-20881931BABF_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4BB2FA45-DDA8-487E-A47A-20881931BABF_see|text=|trigger=button}{sub-section}{sub-section:4BB2FA45-DDA8-487E-A47A-20881931BABF_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4BB2FA45-DDA8-487E-A47A-20881931BABF_see|text=|trigger=button}{sub-section}{sub-section:4BB2FA45-DDA8-487E-A47A-20881931BABF_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4BB2FA45-DDA8-487E-A47A-20881931BABF_sam|text=|trigger=button}{sub-section}{sub-section:4BB2FA45-DDA8-487E-A47A-20881931BABF_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=F48E0AA0-54D3-4D15-BEFF-10B8CC8D5378}{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:F48E0AA0-54D3-4D15-BEFF-10B8CC8D5378_des|text=|trigger=button}{sub-section}{sub-section:F48E0AA0-54D3-4D15-BEFF-10B8CC8D5378_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:F48E0AA0-54D3-4D15-BEFF-10B8CC8D5378_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F48E0AA0-54D3-4D15-BEFF-10B8CC8D5378_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F48E0AA0-54D3-4D15-BEFF-10B8CC8D5378_ret|text=|trigger=button}{sub-section}{sub-section:F48E0AA0-54D3-4D15-BEFF-10B8CC8D5378_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F48E0AA0-54D3-4D15-BEFF-10B8CC8D5378_see|text=|trigger=button}{sub-section}{sub-section:F48E0AA0-54D3-4D15-BEFF-10B8CC8D5378_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F48E0AA0-54D3-4D15-BEFF-10B8CC8D5378_see|text=|trigger=button}{sub-section}{sub-section:F48E0AA0-54D3-4D15-BEFF-10B8CC8D5378_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F48E0AA0-54D3-4D15-BEFF-10B8CC8D5378_sam|text=|trigger=button}{sub-section}{sub-section:F48E0AA0-54D3-4D15-BEFF-10B8CC8D5378_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=A7CBC225-EB8B-4764-AE26-D7939F23B09A}{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:A7CBC225-EB8B-4764-AE26-D7939F23B09A_des|text=|trigger=button}{sub-section}{sub-section:A7CBC225-EB8B-4764-AE26-D7939F23B09A_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:A7CBC225-EB8B-4764-AE26-D7939F23B09A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A7CBC225-EB8B-4764-AE26-D7939F23B09A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A7CBC225-EB8B-4764-AE26-D7939F23B09A_ret|text=|trigger=button}{sub-section}{sub-section:A7CBC225-EB8B-4764-AE26-D7939F23B09A_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A7CBC225-EB8B-4764-AE26-D7939F23B09A_see|text=|trigger=button}{sub-section}{sub-section:A7CBC225-EB8B-4764-AE26-D7939F23B09A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A7CBC225-EB8B-4764-AE26-D7939F23B09A_see|text=|trigger=button}{sub-section}{sub-section:A7CBC225-EB8B-4764-AE26-D7939F23B09A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A7CBC225-EB8B-4764-AE26-D7939F23B09A_sam|text=|trigger=button}{sub-section}{sub-section:A7CBC225-EB8B-4764-AE26-D7939F23B09A_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}