{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}byte[]{td}{td}[#getBytes]\()
{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getContentType]\()
Returns the contenttype of this file, like for example 'application/pdf'.{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=6681E402-6EAA-413F-8949-A7F7DE74B0B8}{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:6681E402-6EAA-413F-8949-A7F7DE74B0B8_des|text=|trigger=button}{sub-section}{sub-section:6681E402-6EAA-413F-8949-A7F7DE74B0B8_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:6681E402-6EAA-413F-8949-A7F7DE74B0B8_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:6681E402-6EAA-413F-8949-A7F7DE74B0B8_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:6681E402-6EAA-413F-8949-A7F7DE74B0B8_ret|text=|trigger=button}{sub-section}{sub-section:6681E402-6EAA-413F-8949-A7F7DE74B0B8_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:6681E402-6EAA-413F-8949-A7F7DE74B0B8_see|text=|trigger=button}{sub-section}{sub-section:6681E402-6EAA-413F-8949-A7F7DE74B0B8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:6681E402-6EAA-413F-8949-A7F7DE74B0B8_see|text=|trigger=button}{sub-section}{sub-section:6681E402-6EAA-413F-8949-A7F7DE74B0B8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:6681E402-6EAA-413F-8949-A7F7DE74B0B8_sam|text=|trigger=button}{sub-section}{sub-section:6681E402-6EAA-413F-8949-A7F7DE74B0B8_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=F8BEEAD7-ABCA-4138-93E5-E2609B388A1D}{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:F8BEEAD7-ABCA-4138-93E5-E2609B388A1D_des|text=|trigger=button}{sub-section}{sub-section:F8BEEAD7-ABCA-4138-93E5-E2609B388A1D_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:F8BEEAD7-ABCA-4138-93E5-E2609B388A1D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F8BEEAD7-ABCA-4138-93E5-E2609B388A1D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F8BEEAD7-ABCA-4138-93E5-E2609B388A1D_ret|text=|trigger=button}{sub-section}{sub-section:F8BEEAD7-ABCA-4138-93E5-E2609B388A1D_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F8BEEAD7-ABCA-4138-93E5-E2609B388A1D_see|text=|trigger=button}{sub-section}{sub-section:F8BEEAD7-ABCA-4138-93E5-E2609B388A1D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F8BEEAD7-ABCA-4138-93E5-E2609B388A1D_see|text=|trigger=button}{sub-section}{sub-section:F8BEEAD7-ABCA-4138-93E5-E2609B388A1D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F8BEEAD7-ABCA-4138-93E5-E2609B388A1D_sam|text=|trigger=button}{sub-section}{sub-section:F8BEEAD7-ABCA-4138-93E5-E2609B388A1D_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=EAFF8702-D58D-4167-A6BE-C8D1CB3F6582}{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:EAFF8702-D58D-4167-A6BE-C8D1CB3F6582_des|text=|trigger=button}{sub-section}{sub-section:EAFF8702-D58D-4167-A6BE-C8D1CB3F6582_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:EAFF8702-D58D-4167-A6BE-C8D1CB3F6582_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EAFF8702-D58D-4167-A6BE-C8D1CB3F6582_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:EAFF8702-D58D-4167-A6BE-C8D1CB3F6582_ret|text=|trigger=button}{sub-section}{sub-section:EAFF8702-D58D-4167-A6BE-C8D1CB3F6582_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:EAFF8702-D58D-4167-A6BE-C8D1CB3F6582_see|text=|trigger=button}{sub-section}{sub-section:EAFF8702-D58D-4167-A6BE-C8D1CB3F6582_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:EAFF8702-D58D-4167-A6BE-C8D1CB3F6582_see|text=|trigger=button}{sub-section}{sub-section:EAFF8702-D58D-4167-A6BE-C8D1CB3F6582_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:EAFF8702-D58D-4167-A6BE-C8D1CB3F6582_sam|text=|trigger=button}{sub-section}{sub-section:EAFF8702-D58D-4167-A6BE-C8D1CB3F6582_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=4F830295-5808-41C7-B904-0495F060E442}{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:4F830295-5808-41C7-B904-0495F060E442_des|text=|trigger=button}{sub-section}{sub-section:4F830295-5808-41C7-B904-0495F060E442_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:4F830295-5808-41C7-B904-0495F060E442_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4F830295-5808-41C7-B904-0495F060E442_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:4F830295-5808-41C7-B904-0495F060E442_ret|text=|trigger=button}{sub-section}{sub-section:4F830295-5808-41C7-B904-0495F060E442_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4F830295-5808-41C7-B904-0495F060E442_see|text=|trigger=button}{sub-section}{sub-section:4F830295-5808-41C7-B904-0495F060E442_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4F830295-5808-41C7-B904-0495F060E442_see|text=|trigger=button}{sub-section}{sub-section:4F830295-5808-41C7-B904-0495F060E442_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4F830295-5808-41C7-B904-0495F060E442_sam|text=|trigger=button}{sub-section}{sub-section:4F830295-5808-41C7-B904-0495F060E442_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=1B5D4D69-084B-4E43-A4F5-3A59044AC40E}{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:1B5D4D69-084B-4E43-A4F5-3A59044AC40E_des|text=|trigger=button}{sub-section}{sub-section:1B5D4D69-084B-4E43-A4F5-3A59044AC40E_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:1B5D4D69-084B-4E43-A4F5-3A59044AC40E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1B5D4D69-084B-4E43-A4F5-3A59044AC40E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:1B5D4D69-084B-4E43-A4F5-3A59044AC40E_ret|text=|trigger=button}{sub-section}{sub-section:1B5D4D69-084B-4E43-A4F5-3A59044AC40E_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1B5D4D69-084B-4E43-A4F5-3A59044AC40E_see|text=|trigger=button}{sub-section}{sub-section:1B5D4D69-084B-4E43-A4F5-3A59044AC40E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1B5D4D69-084B-4E43-A4F5-3A59044AC40E_see|text=|trigger=button}{sub-section}{sub-section:1B5D4D69-084B-4E43-A4F5-3A59044AC40E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1B5D4D69-084B-4E43-A4F5-3A59044AC40E_sam|text=|trigger=button}{sub-section}{sub-section:1B5D4D69-084B-4E43-A4F5-3A59044AC40E_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=DAE8BA82-4081-4B99-BFBC-E7E9FA047477}{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:DAE8BA82-4081-4B99-BFBC-E7E9FA047477_des|text=|trigger=button}{sub-section}{sub-section:DAE8BA82-4081-4B99-BFBC-E7E9FA047477_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:DAE8BA82-4081-4B99-BFBC-E7E9FA047477_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:DAE8BA82-4081-4B99-BFBC-E7E9FA047477_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:DAE8BA82-4081-4B99-BFBC-E7E9FA047477_ret|text=|trigger=button}{sub-section}{sub-section:DAE8BA82-4081-4B99-BFBC-E7E9FA047477_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:DAE8BA82-4081-4B99-BFBC-E7E9FA047477_see|text=|trigger=button}{sub-section}{sub-section:DAE8BA82-4081-4B99-BFBC-E7E9FA047477_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:DAE8BA82-4081-4B99-BFBC-E7E9FA047477_see|text=|trigger=button}{sub-section}{sub-section:DAE8BA82-4081-4B99-BFBC-E7E9FA047477_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:DAE8BA82-4081-4B99-BFBC-E7E9FA047477_sam|text=|trigger=button}{sub-section}{sub-section:DAE8BA82-4081-4B99-BFBC-E7E9FA047477_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=F60AC084-083B-4411-8572-62700A53651F}{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:F60AC084-083B-4411-8572-62700A53651F_des|text=|trigger=button}{sub-section}{sub-section:F60AC084-083B-4411-8572-62700A53651F_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:F60AC084-083B-4411-8572-62700A53651F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F60AC084-083B-4411-8572-62700A53651F_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F60AC084-083B-4411-8572-62700A53651F_ret|text=|trigger=button}{sub-section}{sub-section:F60AC084-083B-4411-8572-62700A53651F_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F60AC084-083B-4411-8572-62700A53651F_see|text=|trigger=button}{sub-section}{sub-section:F60AC084-083B-4411-8572-62700A53651F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F60AC084-083B-4411-8572-62700A53651F_see|text=|trigger=button}{sub-section}{sub-section:F60AC084-083B-4411-8572-62700A53651F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F60AC084-083B-4411-8572-62700A53651F_sam|text=|trigger=button}{sub-section}{sub-section:F60AC084-083B-4411-8572-62700A53651F_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=0F4618A1-E91B-4245-9825-BCB3C48B26FD}{tr:id=name}{td}h6.getBytes{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}getBytes{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:0F4618A1-E91B-4245-9825-BCB3C48B26FD_des|text=|trigger=button}{sub-section}{sub-section:0F4618A1-E91B-4245-9825-BCB3C48B26FD_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:0F4618A1-E91B-4245-9825-BCB3C48B26FD_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0F4618A1-E91B-4245-9825-BCB3C48B26FD_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:0F4618A1-E91B-4245-9825-BCB3C48B26FD_ret|text=|trigger=button}{sub-section}{sub-section:0F4618A1-E91B-4245-9825-BCB3C48B26FD_ret|trigger=none|class=sIndent}byte[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:0F4618A1-E91B-4245-9825-BCB3C48B26FD_see|text=|trigger=button}{sub-section}{sub-section:0F4618A1-E91B-4245-9825-BCB3C48B26FD_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0F4618A1-E91B-4245-9825-BCB3C48B26FD_see|text=|trigger=button}{sub-section}{sub-section:0F4618A1-E91B-4245-9825-BCB3C48B26FD_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:0F4618A1-E91B-4245-9825-BCB3C48B26FD_sam|text=|trigger=button}{sub-section}{sub-section:0F4618A1-E91B-4245-9825-BCB3C48B26FD_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=3C2625C0-F164-4B0C-9CAC-F52B8114CA1A}{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:3C2625C0-F164-4B0C-9CAC-F52B8114CA1A_des|text=|trigger=button}{sub-section}{sub-section:3C2625C0-F164-4B0C-9CAC-F52B8114CA1A_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:3C2625C0-F164-4B0C-9CAC-F52B8114CA1A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3C2625C0-F164-4B0C-9CAC-F52B8114CA1A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:3C2625C0-F164-4B0C-9CAC-F52B8114CA1A_ret|text=|trigger=button}{sub-section}{sub-section:3C2625C0-F164-4B0C-9CAC-F52B8114CA1A_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:3C2625C0-F164-4B0C-9CAC-F52B8114CA1A_see|text=|trigger=button}{sub-section}{sub-section:3C2625C0-F164-4B0C-9CAC-F52B8114CA1A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3C2625C0-F164-4B0C-9CAC-F52B8114CA1A_see|text=|trigger=button}{sub-section}{sub-section:3C2625C0-F164-4B0C-9CAC-F52B8114CA1A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3C2625C0-F164-4B0C-9CAC-F52B8114CA1A_sam|text=|trigger=button}{sub-section}{sub-section:3C2625C0-F164-4B0C-9CAC-F52B8114CA1A_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=E8525C61-158D-4C22-A443-FDCEAB43A7A1}{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:E8525C61-158D-4C22-A443-FDCEAB43A7A1_des|text=|trigger=button}{sub-section}{sub-section:E8525C61-158D-4C22-A443-FDCEAB43A7A1_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:E8525C61-158D-4C22-A443-FDCEAB43A7A1_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E8525C61-158D-4C22-A443-FDCEAB43A7A1_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:E8525C61-158D-4C22-A443-FDCEAB43A7A1_ret|text=|trigger=button}{sub-section}{sub-section:E8525C61-158D-4C22-A443-FDCEAB43A7A1_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E8525C61-158D-4C22-A443-FDCEAB43A7A1_see|text=|trigger=button}{sub-section}{sub-section:E8525C61-158D-4C22-A443-FDCEAB43A7A1_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E8525C61-158D-4C22-A443-FDCEAB43A7A1_see|text=|trigger=button}{sub-section}{sub-section:E8525C61-158D-4C22-A443-FDCEAB43A7A1_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E8525C61-158D-4C22-A443-FDCEAB43A7A1_sam|text=|trigger=button}{sub-section}{sub-section:E8525C61-158D-4C22-A443-FDCEAB43A7A1_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=5A820E0F-1416-4E4F-9AB9-167A9B8748B4}{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:5A820E0F-1416-4E4F-9AB9-167A9B8748B4_des|text=|trigger=button}{sub-section}{sub-section:5A820E0F-1416-4E4F-9AB9-167A9B8748B4_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:5A820E0F-1416-4E4F-9AB9-167A9B8748B4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5A820E0F-1416-4E4F-9AB9-167A9B8748B4_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:5A820E0F-1416-4E4F-9AB9-167A9B8748B4_ret|text=|trigger=button}{sub-section}{sub-section:5A820E0F-1416-4E4F-9AB9-167A9B8748B4_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5A820E0F-1416-4E4F-9AB9-167A9B8748B4_see|text=|trigger=button}{sub-section}{sub-section:5A820E0F-1416-4E4F-9AB9-167A9B8748B4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5A820E0F-1416-4E4F-9AB9-167A9B8748B4_see|text=|trigger=button}{sub-section}{sub-section:5A820E0F-1416-4E4F-9AB9-167A9B8748B4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5A820E0F-1416-4E4F-9AB9-167A9B8748B4_sam|text=|trigger=button}{sub-section}{sub-section:5A820E0F-1416-4E4F-9AB9-167A9B8748B4_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=67118966-810A-43A5-B176-0DD0CD2D29BB}{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:67118966-810A-43A5-B176-0DD0CD2D29BB_des|text=|trigger=button}{sub-section}{sub-section:67118966-810A-43A5-B176-0DD0CD2D29BB_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:67118966-810A-43A5-B176-0DD0CD2D29BB_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:67118966-810A-43A5-B176-0DD0CD2D29BB_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:67118966-810A-43A5-B176-0DD0CD2D29BB_ret|text=|trigger=button}{sub-section}{sub-section:67118966-810A-43A5-B176-0DD0CD2D29BB_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:67118966-810A-43A5-B176-0DD0CD2D29BB_see|text=|trigger=button}{sub-section}{sub-section:67118966-810A-43A5-B176-0DD0CD2D29BB_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:67118966-810A-43A5-B176-0DD0CD2D29BB_see|text=|trigger=button}{sub-section}{sub-section:67118966-810A-43A5-B176-0DD0CD2D29BB_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:67118966-810A-43A5-B176-0DD0CD2D29BB_sam|text=|trigger=button}{sub-section}{sub-section:67118966-810A-43A5-B176-0DD0CD2D29BB_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=7536964F-EE38-47F9-9823-CE1D30384CA2}{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:7536964F-EE38-47F9-9823-CE1D30384CA2_des|text=|trigger=button}{sub-section}{sub-section:7536964F-EE38-47F9-9823-CE1D30384CA2_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:7536964F-EE38-47F9-9823-CE1D30384CA2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7536964F-EE38-47F9-9823-CE1D30384CA2_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:7536964F-EE38-47F9-9823-CE1D30384CA2_ret|text=|trigger=button}{sub-section}{sub-section:7536964F-EE38-47F9-9823-CE1D30384CA2_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:7536964F-EE38-47F9-9823-CE1D30384CA2_see|text=|trigger=button}{sub-section}{sub-section:7536964F-EE38-47F9-9823-CE1D30384CA2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7536964F-EE38-47F9-9823-CE1D30384CA2_see|text=|trigger=button}{sub-section}{sub-section:7536964F-EE38-47F9-9823-CE1D30384CA2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7536964F-EE38-47F9-9823-CE1D30384CA2_sam|text=|trigger=button}{sub-section}{sub-section:7536964F-EE38-47F9-9823-CE1D30384CA2_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=9AF15BF9-6AE3-433B-92D8-90DCDF3C0480}{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:9AF15BF9-6AE3-433B-92D8-90DCDF3C0480_des|text=|trigger=button}{sub-section}{sub-section:9AF15BF9-6AE3-433B-92D8-90DCDF3C0480_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:9AF15BF9-6AE3-433B-92D8-90DCDF3C0480_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9AF15BF9-6AE3-433B-92D8-90DCDF3C0480_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:9AF15BF9-6AE3-433B-92D8-90DCDF3C0480_ret|text=|trigger=button}{sub-section}{sub-section:9AF15BF9-6AE3-433B-92D8-90DCDF3C0480_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:9AF15BF9-6AE3-433B-92D8-90DCDF3C0480_see|text=|trigger=button}{sub-section}{sub-section:9AF15BF9-6AE3-433B-92D8-90DCDF3C0480_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:9AF15BF9-6AE3-433B-92D8-90DCDF3C0480_see|text=|trigger=button}{sub-section}{sub-section:9AF15BF9-6AE3-433B-92D8-90DCDF3C0480_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:9AF15BF9-6AE3-433B-92D8-90DCDF3C0480_sam|text=|trigger=button}{sub-section}{sub-section:9AF15BF9-6AE3-433B-92D8-90DCDF3C0480_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=35795395-E704-41F3-88CF-F2FFC603E03A}{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:35795395-E704-41F3-88CF-F2FFC603E03A_des|text=|trigger=button}{sub-section}{sub-section:35795395-E704-41F3-88CF-F2FFC603E03A_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:35795395-E704-41F3-88CF-F2FFC603E03A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:35795395-E704-41F3-88CF-F2FFC603E03A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:35795395-E704-41F3-88CF-F2FFC603E03A_ret|text=|trigger=button}{sub-section}{sub-section:35795395-E704-41F3-88CF-F2FFC603E03A_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:35795395-E704-41F3-88CF-F2FFC603E03A_see|text=|trigger=button}{sub-section}{sub-section:35795395-E704-41F3-88CF-F2FFC603E03A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:35795395-E704-41F3-88CF-F2FFC603E03A_see|text=|trigger=button}{sub-section}{sub-section:35795395-E704-41F3-88CF-F2FFC603E03A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:35795395-E704-41F3-88CF-F2FFC603E03A_sam|text=|trigger=button}{sub-section}{sub-section:35795395-E704-41F3-88CF-F2FFC603E03A_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=814B73E8-BFD4-4D27-A4EF-FFA1A9CB90BB}{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:814B73E8-BFD4-4D27-A4EF-FFA1A9CB90BB_des|text=|trigger=button}{sub-section}{sub-section:814B73E8-BFD4-4D27-A4EF-FFA1A9CB90BB_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:814B73E8-BFD4-4D27-A4EF-FFA1A9CB90BB_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:814B73E8-BFD4-4D27-A4EF-FFA1A9CB90BB_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:814B73E8-BFD4-4D27-A4EF-FFA1A9CB90BB_ret|text=|trigger=button}{sub-section}{sub-section:814B73E8-BFD4-4D27-A4EF-FFA1A9CB90BB_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:814B73E8-BFD4-4D27-A4EF-FFA1A9CB90BB_see|text=|trigger=button}{sub-section}{sub-section:814B73E8-BFD4-4D27-A4EF-FFA1A9CB90BB_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:814B73E8-BFD4-4D27-A4EF-FFA1A9CB90BB_see|text=|trigger=button}{sub-section}{sub-section:814B73E8-BFD4-4D27-A4EF-FFA1A9CB90BB_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:814B73E8-BFD4-4D27-A4EF-FFA1A9CB90BB_sam|text=|trigger=button}{sub-section}{sub-section:814B73E8-BFD4-4D27-A4EF-FFA1A9CB90BB_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=18F3BBD8-6837-4BBD-873E-E9D41F9CD858}{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:18F3BBD8-6837-4BBD-873E-E9D41F9CD858_des|text=|trigger=button}{sub-section}{sub-section:18F3BBD8-6837-4BBD-873E-E9D41F9CD858_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:18F3BBD8-6837-4BBD-873E-E9D41F9CD858_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:18F3BBD8-6837-4BBD-873E-E9D41F9CD858_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:18F3BBD8-6837-4BBD-873E-E9D41F9CD858_ret|text=|trigger=button}{sub-section}{sub-section:18F3BBD8-6837-4BBD-873E-E9D41F9CD858_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:18F3BBD8-6837-4BBD-873E-E9D41F9CD858_see|text=|trigger=button}{sub-section}{sub-section:18F3BBD8-6837-4BBD-873E-E9D41F9CD858_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:18F3BBD8-6837-4BBD-873E-E9D41F9CD858_see|text=|trigger=button}{sub-section}{sub-section:18F3BBD8-6837-4BBD-873E-E9D41F9CD858_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:18F3BBD8-6837-4BBD-873E-E9D41F9CD858_sam|text=|trigger=button}{sub-section}{sub-section:18F3BBD8-6837-4BBD-873E-E9D41F9CD858_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=D8DFBA2A-54E4-4B03-9B55-D448F745AE29}{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:D8DFBA2A-54E4-4B03-9B55-D448F745AE29_des|text=|trigger=button}{sub-section}{sub-section:D8DFBA2A-54E4-4B03-9B55-D448F745AE29_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:D8DFBA2A-54E4-4B03-9B55-D448F745AE29_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D8DFBA2A-54E4-4B03-9B55-D448F745AE29_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D8DFBA2A-54E4-4B03-9B55-D448F745AE29_ret|text=|trigger=button}{sub-section}{sub-section:D8DFBA2A-54E4-4B03-9B55-D448F745AE29_ret|trigger=none|class=sIndent}[Date]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D8DFBA2A-54E4-4B03-9B55-D448F745AE29_see|text=|trigger=button}{sub-section}{sub-section:D8DFBA2A-54E4-4B03-9B55-D448F745AE29_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D8DFBA2A-54E4-4B03-9B55-D448F745AE29_see|text=|trigger=button}{sub-section}{sub-section:D8DFBA2A-54E4-4B03-9B55-D448F745AE29_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D8DFBA2A-54E4-4B03-9B55-D448F745AE29_sam|text=|trigger=button}{sub-section}{sub-section:D8DFBA2A-54E4-4B03-9B55-D448F745AE29_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=64686436-2819-493E-8F6A-F3C837B49A1B}{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:64686436-2819-493E-8F6A-F3C837B49A1B_des|text=|trigger=button}{sub-section}{sub-section:64686436-2819-493E-8F6A-F3C837B49A1B_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:64686436-2819-493E-8F6A-F3C837B49A1B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:64686436-2819-493E-8F6A-F3C837B49A1B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:64686436-2819-493E-8F6A-F3C837B49A1B_ret|text=|trigger=button}{sub-section}{sub-section:64686436-2819-493E-8F6A-F3C837B49A1B_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:64686436-2819-493E-8F6A-F3C837B49A1B_see|text=|trigger=button}{sub-section}{sub-section:64686436-2819-493E-8F6A-F3C837B49A1B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:64686436-2819-493E-8F6A-F3C837B49A1B_see|text=|trigger=button}{sub-section}{sub-section:64686436-2819-493E-8F6A-F3C837B49A1B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:64686436-2819-493E-8F6A-F3C837B49A1B_sam|text=|trigger=button}{sub-section}{sub-section:64686436-2819-493E-8F6A-F3C837B49A1B_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=62E69AE4-D4E5-4C25-A325-B4F85BB617DB}{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:62E69AE4-D4E5-4C25-A325-B4F85BB617DB_des|text=|trigger=button}{sub-section}{sub-section:62E69AE4-D4E5-4C25-A325-B4F85BB617DB_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:62E69AE4-D4E5-4C25-A325-B4F85BB617DB_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:62E69AE4-D4E5-4C25-A325-B4F85BB617DB_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:62E69AE4-D4E5-4C25-A325-B4F85BB617DB_ret|text=|trigger=button}{sub-section}{sub-section:62E69AE4-D4E5-4C25-A325-B4F85BB617DB_ret|trigger=none|class=sIndent}[JSFile]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:62E69AE4-D4E5-4C25-A325-B4F85BB617DB_see|text=|trigger=button}{sub-section}{sub-section:62E69AE4-D4E5-4C25-A325-B4F85BB617DB_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:62E69AE4-D4E5-4C25-A325-B4F85BB617DB_see|text=|trigger=button}{sub-section}{sub-section:62E69AE4-D4E5-4C25-A325-B4F85BB617DB_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:62E69AE4-D4E5-4C25-A325-B4F85BB617DB_sam|text=|trigger=button}{sub-section}{sub-section:62E69AE4-D4E5-4C25-A325-B4F85BB617DB_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=0EB678EA-8100-48B1-908D-5B5D48C21B7F}{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:0EB678EA-8100-48B1-908D-5B5D48C21B7F_des|text=|trigger=button}{sub-section}{sub-section:0EB678EA-8100-48B1-908D-5B5D48C21B7F_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:0EB678EA-8100-48B1-908D-5B5D48C21B7F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0EB678EA-8100-48B1-908D-5B5D48C21B7F_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:0EB678EA-8100-48B1-908D-5B5D48C21B7F_ret|text=|trigger=button}{sub-section}{sub-section:0EB678EA-8100-48B1-908D-5B5D48C21B7F_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:0EB678EA-8100-48B1-908D-5B5D48C21B7F_see|text=|trigger=button}{sub-section}{sub-section:0EB678EA-8100-48B1-908D-5B5D48C21B7F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0EB678EA-8100-48B1-908D-5B5D48C21B7F_see|text=|trigger=button}{sub-section}{sub-section:0EB678EA-8100-48B1-908D-5B5D48C21B7F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:0EB678EA-8100-48B1-908D-5B5D48C21B7F_sam|text=|trigger=button}{sub-section}{sub-section:0EB678EA-8100-48B1-908D-5B5D48C21B7F_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=064862F6-9F76-4724-B41F-92951AFF779D}{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:064862F6-9F76-4724-B41F-92951AFF779D_des|text=|trigger=button}{sub-section}{sub-section:064862F6-9F76-4724-B41F-92951AFF779D_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:064862F6-9F76-4724-B41F-92951AFF779D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:064862F6-9F76-4724-B41F-92951AFF779D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:064862F6-9F76-4724-B41F-92951AFF779D_ret|text=|trigger=button}{sub-section}{sub-section:064862F6-9F76-4724-B41F-92951AFF779D_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:064862F6-9F76-4724-B41F-92951AFF779D_see|text=|trigger=button}{sub-section}{sub-section:064862F6-9F76-4724-B41F-92951AFF779D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:064862F6-9F76-4724-B41F-92951AFF779D_see|text=|trigger=button}{sub-section}{sub-section:064862F6-9F76-4724-B41F-92951AFF779D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:064862F6-9F76-4724-B41F-92951AFF779D_sam|text=|trigger=button}{sub-section}{sub-section:064862F6-9F76-4724-B41F-92951AFF779D_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=C21B2DE5-8A54-49E7-AB53-66B00A678621}{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:C21B2DE5-8A54-49E7-AB53-66B00A678621_des|text=|trigger=button}{sub-section}{sub-section:C21B2DE5-8A54-49E7-AB53-66B00A678621_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:C21B2DE5-8A54-49E7-AB53-66B00A678621_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C21B2DE5-8A54-49E7-AB53-66B00A678621_prs|trigger=none}destination
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:C21B2DE5-8A54-49E7-AB53-66B00A678621_ret|text=|trigger=button}{sub-section}{sub-section:C21B2DE5-8A54-49E7-AB53-66B00A678621_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C21B2DE5-8A54-49E7-AB53-66B00A678621_see|text=|trigger=button}{sub-section}{sub-section:C21B2DE5-8A54-49E7-AB53-66B00A678621_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C21B2DE5-8A54-49E7-AB53-66B00A678621_see|text=|trigger=button}{sub-section}{sub-section:C21B2DE5-8A54-49E7-AB53-66B00A678621_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C21B2DE5-8A54-49E7-AB53-66B00A678621_sam|text=|trigger=button}{sub-section}{sub-section:C21B2DE5-8A54-49E7-AB53-66B00A678621_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=F8223FEE-D1AA-434F-9CD0-C0FB1D6EE5F8}{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:F8223FEE-D1AA-434F-9CD0-C0FB1D6EE5F8_des|text=|trigger=button}{sub-section}{sub-section:F8223FEE-D1AA-434F-9CD0-C0FB1D6EE5F8_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:F8223FEE-D1AA-434F-9CD0-C0FB1D6EE5F8_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F8223FEE-D1AA-434F-9CD0-C0FB1D6EE5F8_prs|trigger=none}date
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:F8223FEE-D1AA-434F-9CD0-C0FB1D6EE5F8_ret|text=|trigger=button}{sub-section}{sub-section:F8223FEE-D1AA-434F-9CD0-C0FB1D6EE5F8_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F8223FEE-D1AA-434F-9CD0-C0FB1D6EE5F8_see|text=|trigger=button}{sub-section}{sub-section:F8223FEE-D1AA-434F-9CD0-C0FB1D6EE5F8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F8223FEE-D1AA-434F-9CD0-C0FB1D6EE5F8_see|text=|trigger=button}{sub-section}{sub-section:F8223FEE-D1AA-434F-9CD0-C0FB1D6EE5F8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F8223FEE-D1AA-434F-9CD0-C0FB1D6EE5F8_sam|text=|trigger=button}{sub-section}{sub-section:F8223FEE-D1AA-434F-9CD0-C0FB1D6EE5F8_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=DCDFE3C2-4406-4416-BF55-680F4295889E}{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:DCDFE3C2-4406-4416-BF55-680F4295889E_des|text=|trigger=button}{sub-section}{sub-section:DCDFE3C2-4406-4416-BF55-680F4295889E_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:DCDFE3C2-4406-4416-BF55-680F4295889E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:DCDFE3C2-4406-4416-BF55-680F4295889E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:DCDFE3C2-4406-4416-BF55-680F4295889E_ret|text=|trigger=button}{sub-section}{sub-section:DCDFE3C2-4406-4416-BF55-680F4295889E_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:DCDFE3C2-4406-4416-BF55-680F4295889E_see|text=|trigger=button}{sub-section}{sub-section:DCDFE3C2-4406-4416-BF55-680F4295889E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:DCDFE3C2-4406-4416-BF55-680F4295889E_see|text=|trigger=button}{sub-section}{sub-section:DCDFE3C2-4406-4416-BF55-680F4295889E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:DCDFE3C2-4406-4416-BF55-680F4295889E_sam|text=|trigger=button}{sub-section}{sub-section:DCDFE3C2-4406-4416-BF55-680F4295889E_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=AF61AC68-E713-450A-8D36-3950A1FB5249}{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:AF61AC68-E713-450A-8D36-3950A1FB5249_des|text=|trigger=button}{sub-section}{sub-section:AF61AC68-E713-450A-8D36-3950A1FB5249_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:AF61AC68-E713-450A-8D36-3950A1FB5249_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AF61AC68-E713-450A-8D36-3950A1FB5249_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:AF61AC68-E713-450A-8D36-3950A1FB5249_ret|text=|trigger=button}{sub-section}{sub-section:AF61AC68-E713-450A-8D36-3950A1FB5249_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AF61AC68-E713-450A-8D36-3950A1FB5249_see|text=|trigger=button}{sub-section}{sub-section:AF61AC68-E713-450A-8D36-3950A1FB5249_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AF61AC68-E713-450A-8D36-3950A1FB5249_see|text=|trigger=button}{sub-section}{sub-section:AF61AC68-E713-450A-8D36-3950A1FB5249_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AF61AC68-E713-450A-8D36-3950A1FB5249_sam|text=|trigger=button}{sub-section}{sub-section:AF61AC68-E713-450A-8D36-3950A1FB5249_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}