{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=71101C70-D463-4F8D-BE01-4AD1D09F528C}{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:71101C70-D463-4F8D-BE01-4AD1D09F528C_des|text=|trigger=button}{sub-section}{sub-section:71101C70-D463-4F8D-BE01-4AD1D09F528C_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:71101C70-D463-4F8D-BE01-4AD1D09F528C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:71101C70-D463-4F8D-BE01-4AD1D09F528C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:71101C70-D463-4F8D-BE01-4AD1D09F528C_ret|text=|trigger=button}{sub-section}{sub-section:71101C70-D463-4F8D-BE01-4AD1D09F528C_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:71101C70-D463-4F8D-BE01-4AD1D09F528C_see|text=|trigger=button}{sub-section}{sub-section:71101C70-D463-4F8D-BE01-4AD1D09F528C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:71101C70-D463-4F8D-BE01-4AD1D09F528C_see|text=|trigger=button}{sub-section}{sub-section:71101C70-D463-4F8D-BE01-4AD1D09F528C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:71101C70-D463-4F8D-BE01-4AD1D09F528C_sam|text=|trigger=button}{sub-section}{sub-section:71101C70-D463-4F8D-BE01-4AD1D09F528C_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=8638DB5D-B9B9-42CD-A54F-B0E589581849}{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:8638DB5D-B9B9-42CD-A54F-B0E589581849_des|text=|trigger=button}{sub-section}{sub-section:8638DB5D-B9B9-42CD-A54F-B0E589581849_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:8638DB5D-B9B9-42CD-A54F-B0E589581849_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8638DB5D-B9B9-42CD-A54F-B0E589581849_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:8638DB5D-B9B9-42CD-A54F-B0E589581849_ret|text=|trigger=button}{sub-section}{sub-section:8638DB5D-B9B9-42CD-A54F-B0E589581849_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8638DB5D-B9B9-42CD-A54F-B0E589581849_see|text=|trigger=button}{sub-section}{sub-section:8638DB5D-B9B9-42CD-A54F-B0E589581849_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8638DB5D-B9B9-42CD-A54F-B0E589581849_see|text=|trigger=button}{sub-section}{sub-section:8638DB5D-B9B9-42CD-A54F-B0E589581849_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8638DB5D-B9B9-42CD-A54F-B0E589581849_sam|text=|trigger=button}{sub-section}{sub-section:8638DB5D-B9B9-42CD-A54F-B0E589581849_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=C7B6DBDD-9831-417C-A334-2D6C5F889435}{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:C7B6DBDD-9831-417C-A334-2D6C5F889435_des|text=|trigger=button}{sub-section}{sub-section:C7B6DBDD-9831-417C-A334-2D6C5F889435_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:C7B6DBDD-9831-417C-A334-2D6C5F889435_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C7B6DBDD-9831-417C-A334-2D6C5F889435_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C7B6DBDD-9831-417C-A334-2D6C5F889435_ret|text=|trigger=button}{sub-section}{sub-section:C7B6DBDD-9831-417C-A334-2D6C5F889435_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C7B6DBDD-9831-417C-A334-2D6C5F889435_see|text=|trigger=button}{sub-section}{sub-section:C7B6DBDD-9831-417C-A334-2D6C5F889435_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C7B6DBDD-9831-417C-A334-2D6C5F889435_see|text=|trigger=button}{sub-section}{sub-section:C7B6DBDD-9831-417C-A334-2D6C5F889435_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C7B6DBDD-9831-417C-A334-2D6C5F889435_sam|text=|trigger=button}{sub-section}{sub-section:C7B6DBDD-9831-417C-A334-2D6C5F889435_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=D04EAB1B-258D-42B1-9B23-974A8F894C4E}{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:D04EAB1B-258D-42B1-9B23-974A8F894C4E_des|text=|trigger=button}{sub-section}{sub-section:D04EAB1B-258D-42B1-9B23-974A8F894C4E_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:D04EAB1B-258D-42B1-9B23-974A8F894C4E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D04EAB1B-258D-42B1-9B23-974A8F894C4E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D04EAB1B-258D-42B1-9B23-974A8F894C4E_ret|text=|trigger=button}{sub-section}{sub-section:D04EAB1B-258D-42B1-9B23-974A8F894C4E_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D04EAB1B-258D-42B1-9B23-974A8F894C4E_see|text=|trigger=button}{sub-section}{sub-section:D04EAB1B-258D-42B1-9B23-974A8F894C4E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D04EAB1B-258D-42B1-9B23-974A8F894C4E_see|text=|trigger=button}{sub-section}{sub-section:D04EAB1B-258D-42B1-9B23-974A8F894C4E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D04EAB1B-258D-42B1-9B23-974A8F894C4E_sam|text=|trigger=button}{sub-section}{sub-section:D04EAB1B-258D-42B1-9B23-974A8F894C4E_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=5CB1DE91-42FD-4884-A1B0-67DEE71ADE7C}{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:5CB1DE91-42FD-4884-A1B0-67DEE71ADE7C_des|text=|trigger=button}{sub-section}{sub-section:5CB1DE91-42FD-4884-A1B0-67DEE71ADE7C_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:5CB1DE91-42FD-4884-A1B0-67DEE71ADE7C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5CB1DE91-42FD-4884-A1B0-67DEE71ADE7C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:5CB1DE91-42FD-4884-A1B0-67DEE71ADE7C_ret|text=|trigger=button}{sub-section}{sub-section:5CB1DE91-42FD-4884-A1B0-67DEE71ADE7C_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5CB1DE91-42FD-4884-A1B0-67DEE71ADE7C_see|text=|trigger=button}{sub-section}{sub-section:5CB1DE91-42FD-4884-A1B0-67DEE71ADE7C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5CB1DE91-42FD-4884-A1B0-67DEE71ADE7C_see|text=|trigger=button}{sub-section}{sub-section:5CB1DE91-42FD-4884-A1B0-67DEE71ADE7C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5CB1DE91-42FD-4884-A1B0-67DEE71ADE7C_sam|text=|trigger=button}{sub-section}{sub-section:5CB1DE91-42FD-4884-A1B0-67DEE71ADE7C_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=762C8E2B-F53E-4033-BA5D-C469A134C8DF}{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:762C8E2B-F53E-4033-BA5D-C469A134C8DF_des|text=|trigger=button}{sub-section}{sub-section:762C8E2B-F53E-4033-BA5D-C469A134C8DF_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:762C8E2B-F53E-4033-BA5D-C469A134C8DF_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:762C8E2B-F53E-4033-BA5D-C469A134C8DF_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:762C8E2B-F53E-4033-BA5D-C469A134C8DF_ret|text=|trigger=button}{sub-section}{sub-section:762C8E2B-F53E-4033-BA5D-C469A134C8DF_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:762C8E2B-F53E-4033-BA5D-C469A134C8DF_see|text=|trigger=button}{sub-section}{sub-section:762C8E2B-F53E-4033-BA5D-C469A134C8DF_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:762C8E2B-F53E-4033-BA5D-C469A134C8DF_see|text=|trigger=button}{sub-section}{sub-section:762C8E2B-F53E-4033-BA5D-C469A134C8DF_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:762C8E2B-F53E-4033-BA5D-C469A134C8DF_sam|text=|trigger=button}{sub-section}{sub-section:762C8E2B-F53E-4033-BA5D-C469A134C8DF_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=253DF1E6-8D7A-4E8C-91A6-7BA9F3F9F96D}{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:253DF1E6-8D7A-4E8C-91A6-7BA9F3F9F96D_des|text=|trigger=button}{sub-section}{sub-section:253DF1E6-8D7A-4E8C-91A6-7BA9F3F9F96D_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:253DF1E6-8D7A-4E8C-91A6-7BA9F3F9F96D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:253DF1E6-8D7A-4E8C-91A6-7BA9F3F9F96D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:253DF1E6-8D7A-4E8C-91A6-7BA9F3F9F96D_ret|text=|trigger=button}{sub-section}{sub-section:253DF1E6-8D7A-4E8C-91A6-7BA9F3F9F96D_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:253DF1E6-8D7A-4E8C-91A6-7BA9F3F9F96D_see|text=|trigger=button}{sub-section}{sub-section:253DF1E6-8D7A-4E8C-91A6-7BA9F3F9F96D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:253DF1E6-8D7A-4E8C-91A6-7BA9F3F9F96D_see|text=|trigger=button}{sub-section}{sub-section:253DF1E6-8D7A-4E8C-91A6-7BA9F3F9F96D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:253DF1E6-8D7A-4E8C-91A6-7BA9F3F9F96D_sam|text=|trigger=button}{sub-section}{sub-section:253DF1E6-8D7A-4E8C-91A6-7BA9F3F9F96D_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=25073AEF-9801-4207-B35F-647A72F6681D}{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:25073AEF-9801-4207-B35F-647A72F6681D_des|text=|trigger=button}{sub-section}{sub-section:25073AEF-9801-4207-B35F-647A72F6681D_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:25073AEF-9801-4207-B35F-647A72F6681D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:25073AEF-9801-4207-B35F-647A72F6681D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:25073AEF-9801-4207-B35F-647A72F6681D_ret|text=|trigger=button}{sub-section}{sub-section:25073AEF-9801-4207-B35F-647A72F6681D_ret|trigger=none|class=sIndent}byte[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:25073AEF-9801-4207-B35F-647A72F6681D_see|text=|trigger=button}{sub-section}{sub-section:25073AEF-9801-4207-B35F-647A72F6681D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:25073AEF-9801-4207-B35F-647A72F6681D_see|text=|trigger=button}{sub-section}{sub-section:25073AEF-9801-4207-B35F-647A72F6681D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:25073AEF-9801-4207-B35F-647A72F6681D_sam|text=|trigger=button}{sub-section}{sub-section:25073AEF-9801-4207-B35F-647A72F6681D_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=9CA3C7C8-0430-4582-B8D8-AE64EA8F7BB4}{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:9CA3C7C8-0430-4582-B8D8-AE64EA8F7BB4_des|text=|trigger=button}{sub-section}{sub-section:9CA3C7C8-0430-4582-B8D8-AE64EA8F7BB4_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:9CA3C7C8-0430-4582-B8D8-AE64EA8F7BB4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9CA3C7C8-0430-4582-B8D8-AE64EA8F7BB4_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:9CA3C7C8-0430-4582-B8D8-AE64EA8F7BB4_ret|text=|trigger=button}{sub-section}{sub-section:9CA3C7C8-0430-4582-B8D8-AE64EA8F7BB4_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:9CA3C7C8-0430-4582-B8D8-AE64EA8F7BB4_see|text=|trigger=button}{sub-section}{sub-section:9CA3C7C8-0430-4582-B8D8-AE64EA8F7BB4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:9CA3C7C8-0430-4582-B8D8-AE64EA8F7BB4_see|text=|trigger=button}{sub-section}{sub-section:9CA3C7C8-0430-4582-B8D8-AE64EA8F7BB4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:9CA3C7C8-0430-4582-B8D8-AE64EA8F7BB4_sam|text=|trigger=button}{sub-section}{sub-section:9CA3C7C8-0430-4582-B8D8-AE64EA8F7BB4_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=ED2BA8C8-6C88-4769-9929-00F2CFC0CD8B}{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:ED2BA8C8-6C88-4769-9929-00F2CFC0CD8B_des|text=|trigger=button}{sub-section}{sub-section:ED2BA8C8-6C88-4769-9929-00F2CFC0CD8B_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:ED2BA8C8-6C88-4769-9929-00F2CFC0CD8B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ED2BA8C8-6C88-4769-9929-00F2CFC0CD8B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:ED2BA8C8-6C88-4769-9929-00F2CFC0CD8B_ret|text=|trigger=button}{sub-section}{sub-section:ED2BA8C8-6C88-4769-9929-00F2CFC0CD8B_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:ED2BA8C8-6C88-4769-9929-00F2CFC0CD8B_see|text=|trigger=button}{sub-section}{sub-section:ED2BA8C8-6C88-4769-9929-00F2CFC0CD8B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:ED2BA8C8-6C88-4769-9929-00F2CFC0CD8B_see|text=|trigger=button}{sub-section}{sub-section:ED2BA8C8-6C88-4769-9929-00F2CFC0CD8B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:ED2BA8C8-6C88-4769-9929-00F2CFC0CD8B_sam|text=|trigger=button}{sub-section}{sub-section:ED2BA8C8-6C88-4769-9929-00F2CFC0CD8B_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=9A669B5F-22CA-4658-98FE-CA972ECF8783}{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:9A669B5F-22CA-4658-98FE-CA972ECF8783_des|text=|trigger=button}{sub-section}{sub-section:9A669B5F-22CA-4658-98FE-CA972ECF8783_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:9A669B5F-22CA-4658-98FE-CA972ECF8783_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9A669B5F-22CA-4658-98FE-CA972ECF8783_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:9A669B5F-22CA-4658-98FE-CA972ECF8783_ret|text=|trigger=button}{sub-section}{sub-section:9A669B5F-22CA-4658-98FE-CA972ECF8783_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:9A669B5F-22CA-4658-98FE-CA972ECF8783_see|text=|trigger=button}{sub-section}{sub-section:9A669B5F-22CA-4658-98FE-CA972ECF8783_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:9A669B5F-22CA-4658-98FE-CA972ECF8783_see|text=|trigger=button}{sub-section}{sub-section:9A669B5F-22CA-4658-98FE-CA972ECF8783_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:9A669B5F-22CA-4658-98FE-CA972ECF8783_sam|text=|trigger=button}{sub-section}{sub-section:9A669B5F-22CA-4658-98FE-CA972ECF8783_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=A45CC33A-073E-4E14-9945-6B2AAB9512A9}{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:A45CC33A-073E-4E14-9945-6B2AAB9512A9_des|text=|trigger=button}{sub-section}{sub-section:A45CC33A-073E-4E14-9945-6B2AAB9512A9_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:A45CC33A-073E-4E14-9945-6B2AAB9512A9_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A45CC33A-073E-4E14-9945-6B2AAB9512A9_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A45CC33A-073E-4E14-9945-6B2AAB9512A9_ret|text=|trigger=button}{sub-section}{sub-section:A45CC33A-073E-4E14-9945-6B2AAB9512A9_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A45CC33A-073E-4E14-9945-6B2AAB9512A9_see|text=|trigger=button}{sub-section}{sub-section:A45CC33A-073E-4E14-9945-6B2AAB9512A9_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A45CC33A-073E-4E14-9945-6B2AAB9512A9_see|text=|trigger=button}{sub-section}{sub-section:A45CC33A-073E-4E14-9945-6B2AAB9512A9_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A45CC33A-073E-4E14-9945-6B2AAB9512A9_sam|text=|trigger=button}{sub-section}{sub-section:A45CC33A-073E-4E14-9945-6B2AAB9512A9_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=1426D2C0-EACC-4A23-9DE5-83EE7178274D}{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:1426D2C0-EACC-4A23-9DE5-83EE7178274D_des|text=|trigger=button}{sub-section}{sub-section:1426D2C0-EACC-4A23-9DE5-83EE7178274D_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:1426D2C0-EACC-4A23-9DE5-83EE7178274D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1426D2C0-EACC-4A23-9DE5-83EE7178274D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:1426D2C0-EACC-4A23-9DE5-83EE7178274D_ret|text=|trigger=button}{sub-section}{sub-section:1426D2C0-EACC-4A23-9DE5-83EE7178274D_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1426D2C0-EACC-4A23-9DE5-83EE7178274D_see|text=|trigger=button}{sub-section}{sub-section:1426D2C0-EACC-4A23-9DE5-83EE7178274D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1426D2C0-EACC-4A23-9DE5-83EE7178274D_see|text=|trigger=button}{sub-section}{sub-section:1426D2C0-EACC-4A23-9DE5-83EE7178274D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1426D2C0-EACC-4A23-9DE5-83EE7178274D_sam|text=|trigger=button}{sub-section}{sub-section:1426D2C0-EACC-4A23-9DE5-83EE7178274D_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=F9E7A44A-BE77-46DB-A2DC-5C364DEAA29F}{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:F9E7A44A-BE77-46DB-A2DC-5C364DEAA29F_des|text=|trigger=button}{sub-section}{sub-section:F9E7A44A-BE77-46DB-A2DC-5C364DEAA29F_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:F9E7A44A-BE77-46DB-A2DC-5C364DEAA29F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F9E7A44A-BE77-46DB-A2DC-5C364DEAA29F_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F9E7A44A-BE77-46DB-A2DC-5C364DEAA29F_ret|text=|trigger=button}{sub-section}{sub-section:F9E7A44A-BE77-46DB-A2DC-5C364DEAA29F_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F9E7A44A-BE77-46DB-A2DC-5C364DEAA29F_see|text=|trigger=button}{sub-section}{sub-section:F9E7A44A-BE77-46DB-A2DC-5C364DEAA29F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F9E7A44A-BE77-46DB-A2DC-5C364DEAA29F_see|text=|trigger=button}{sub-section}{sub-section:F9E7A44A-BE77-46DB-A2DC-5C364DEAA29F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F9E7A44A-BE77-46DB-A2DC-5C364DEAA29F_sam|text=|trigger=button}{sub-section}{sub-section:F9E7A44A-BE77-46DB-A2DC-5C364DEAA29F_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=567057B4-F930-4DA2-AC7F-9B1E564F3F24}{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:567057B4-F930-4DA2-AC7F-9B1E564F3F24_des|text=|trigger=button}{sub-section}{sub-section:567057B4-F930-4DA2-AC7F-9B1E564F3F24_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:567057B4-F930-4DA2-AC7F-9B1E564F3F24_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:567057B4-F930-4DA2-AC7F-9B1E564F3F24_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:567057B4-F930-4DA2-AC7F-9B1E564F3F24_ret|text=|trigger=button}{sub-section}{sub-section:567057B4-F930-4DA2-AC7F-9B1E564F3F24_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:567057B4-F930-4DA2-AC7F-9B1E564F3F24_see|text=|trigger=button}{sub-section}{sub-section:567057B4-F930-4DA2-AC7F-9B1E564F3F24_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:567057B4-F930-4DA2-AC7F-9B1E564F3F24_see|text=|trigger=button}{sub-section}{sub-section:567057B4-F930-4DA2-AC7F-9B1E564F3F24_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:567057B4-F930-4DA2-AC7F-9B1E564F3F24_sam|text=|trigger=button}{sub-section}{sub-section:567057B4-F930-4DA2-AC7F-9B1E564F3F24_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=9E799CBD-9017-4236-A7CD-CFE3F369B04E}{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:9E799CBD-9017-4236-A7CD-CFE3F369B04E_des|text=|trigger=button}{sub-section}{sub-section:9E799CBD-9017-4236-A7CD-CFE3F369B04E_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:9E799CBD-9017-4236-A7CD-CFE3F369B04E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9E799CBD-9017-4236-A7CD-CFE3F369B04E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:9E799CBD-9017-4236-A7CD-CFE3F369B04E_ret|text=|trigger=button}{sub-section}{sub-section:9E799CBD-9017-4236-A7CD-CFE3F369B04E_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:9E799CBD-9017-4236-A7CD-CFE3F369B04E_see|text=|trigger=button}{sub-section}{sub-section:9E799CBD-9017-4236-A7CD-CFE3F369B04E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:9E799CBD-9017-4236-A7CD-CFE3F369B04E_see|text=|trigger=button}{sub-section}{sub-section:9E799CBD-9017-4236-A7CD-CFE3F369B04E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:9E799CBD-9017-4236-A7CD-CFE3F369B04E_sam|text=|trigger=button}{sub-section}{sub-section:9E799CBD-9017-4236-A7CD-CFE3F369B04E_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=F620BCD1-465E-4F07-B8F9-9BBDF01A6B51}{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:F620BCD1-465E-4F07-B8F9-9BBDF01A6B51_des|text=|trigger=button}{sub-section}{sub-section:F620BCD1-465E-4F07-B8F9-9BBDF01A6B51_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:F620BCD1-465E-4F07-B8F9-9BBDF01A6B51_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F620BCD1-465E-4F07-B8F9-9BBDF01A6B51_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F620BCD1-465E-4F07-B8F9-9BBDF01A6B51_ret|text=|trigger=button}{sub-section}{sub-section:F620BCD1-465E-4F07-B8F9-9BBDF01A6B51_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F620BCD1-465E-4F07-B8F9-9BBDF01A6B51_see|text=|trigger=button}{sub-section}{sub-section:F620BCD1-465E-4F07-B8F9-9BBDF01A6B51_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F620BCD1-465E-4F07-B8F9-9BBDF01A6B51_see|text=|trigger=button}{sub-section}{sub-section:F620BCD1-465E-4F07-B8F9-9BBDF01A6B51_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F620BCD1-465E-4F07-B8F9-9BBDF01A6B51_sam|text=|trigger=button}{sub-section}{sub-section:F620BCD1-465E-4F07-B8F9-9BBDF01A6B51_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=E61BE0AA-164C-4732-A4AD-308627FD0595}{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:E61BE0AA-164C-4732-A4AD-308627FD0595_des|text=|trigger=button}{sub-section}{sub-section:E61BE0AA-164C-4732-A4AD-308627FD0595_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:E61BE0AA-164C-4732-A4AD-308627FD0595_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E61BE0AA-164C-4732-A4AD-308627FD0595_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:E61BE0AA-164C-4732-A4AD-308627FD0595_ret|text=|trigger=button}{sub-section}{sub-section:E61BE0AA-164C-4732-A4AD-308627FD0595_ret|trigger=none|class=sIndent}[Date]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E61BE0AA-164C-4732-A4AD-308627FD0595_see|text=|trigger=button}{sub-section}{sub-section:E61BE0AA-164C-4732-A4AD-308627FD0595_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E61BE0AA-164C-4732-A4AD-308627FD0595_see|text=|trigger=button}{sub-section}{sub-section:E61BE0AA-164C-4732-A4AD-308627FD0595_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E61BE0AA-164C-4732-A4AD-308627FD0595_sam|text=|trigger=button}{sub-section}{sub-section:E61BE0AA-164C-4732-A4AD-308627FD0595_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=DAF89137-C8A5-4C10-85C6-D2F16B67B616}{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:DAF89137-C8A5-4C10-85C6-D2F16B67B616_des|text=|trigger=button}{sub-section}{sub-section:DAF89137-C8A5-4C10-85C6-D2F16B67B616_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:DAF89137-C8A5-4C10-85C6-D2F16B67B616_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:DAF89137-C8A5-4C10-85C6-D2F16B67B616_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:DAF89137-C8A5-4C10-85C6-D2F16B67B616_ret|text=|trigger=button}{sub-section}{sub-section:DAF89137-C8A5-4C10-85C6-D2F16B67B616_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:DAF89137-C8A5-4C10-85C6-D2F16B67B616_see|text=|trigger=button}{sub-section}{sub-section:DAF89137-C8A5-4C10-85C6-D2F16B67B616_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:DAF89137-C8A5-4C10-85C6-D2F16B67B616_see|text=|trigger=button}{sub-section}{sub-section:DAF89137-C8A5-4C10-85C6-D2F16B67B616_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:DAF89137-C8A5-4C10-85C6-D2F16B67B616_sam|text=|trigger=button}{sub-section}{sub-section:DAF89137-C8A5-4C10-85C6-D2F16B67B616_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=153B843A-2D77-4CAF-B598-643AF5600408}{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:153B843A-2D77-4CAF-B598-643AF5600408_des|text=|trigger=button}{sub-section}{sub-section:153B843A-2D77-4CAF-B598-643AF5600408_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:153B843A-2D77-4CAF-B598-643AF5600408_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:153B843A-2D77-4CAF-B598-643AF5600408_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:153B843A-2D77-4CAF-B598-643AF5600408_ret|text=|trigger=button}{sub-section}{sub-section:153B843A-2D77-4CAF-B598-643AF5600408_ret|trigger=none|class=sIndent}[JSFile]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:153B843A-2D77-4CAF-B598-643AF5600408_see|text=|trigger=button}{sub-section}{sub-section:153B843A-2D77-4CAF-B598-643AF5600408_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:153B843A-2D77-4CAF-B598-643AF5600408_see|text=|trigger=button}{sub-section}{sub-section:153B843A-2D77-4CAF-B598-643AF5600408_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:153B843A-2D77-4CAF-B598-643AF5600408_sam|text=|trigger=button}{sub-section}{sub-section:153B843A-2D77-4CAF-B598-643AF5600408_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=B62DA959-00DB-46A0-BEC6-7227FE1726EF}{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:B62DA959-00DB-46A0-BEC6-7227FE1726EF_des|text=|trigger=button}{sub-section}{sub-section:B62DA959-00DB-46A0-BEC6-7227FE1726EF_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:B62DA959-00DB-46A0-BEC6-7227FE1726EF_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B62DA959-00DB-46A0-BEC6-7227FE1726EF_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:B62DA959-00DB-46A0-BEC6-7227FE1726EF_ret|text=|trigger=button}{sub-section}{sub-section:B62DA959-00DB-46A0-BEC6-7227FE1726EF_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B62DA959-00DB-46A0-BEC6-7227FE1726EF_see|text=|trigger=button}{sub-section}{sub-section:B62DA959-00DB-46A0-BEC6-7227FE1726EF_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B62DA959-00DB-46A0-BEC6-7227FE1726EF_see|text=|trigger=button}{sub-section}{sub-section:B62DA959-00DB-46A0-BEC6-7227FE1726EF_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B62DA959-00DB-46A0-BEC6-7227FE1726EF_sam|text=|trigger=button}{sub-section}{sub-section:B62DA959-00DB-46A0-BEC6-7227FE1726EF_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=51A7A610-C794-42D5-8490-3DDDF657469B}{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:51A7A610-C794-42D5-8490-3DDDF657469B_des|text=|trigger=button}{sub-section}{sub-section:51A7A610-C794-42D5-8490-3DDDF657469B_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:51A7A610-C794-42D5-8490-3DDDF657469B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:51A7A610-C794-42D5-8490-3DDDF657469B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:51A7A610-C794-42D5-8490-3DDDF657469B_ret|text=|trigger=button}{sub-section}{sub-section:51A7A610-C794-42D5-8490-3DDDF657469B_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:51A7A610-C794-42D5-8490-3DDDF657469B_see|text=|trigger=button}{sub-section}{sub-section:51A7A610-C794-42D5-8490-3DDDF657469B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:51A7A610-C794-42D5-8490-3DDDF657469B_see|text=|trigger=button}{sub-section}{sub-section:51A7A610-C794-42D5-8490-3DDDF657469B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:51A7A610-C794-42D5-8490-3DDDF657469B_sam|text=|trigger=button}{sub-section}{sub-section:51A7A610-C794-42D5-8490-3DDDF657469B_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=3174FB35-052C-4DE4-932D-A03C96B9B05E}{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:3174FB35-052C-4DE4-932D-A03C96B9B05E_des|text=|trigger=button}{sub-section}{sub-section:3174FB35-052C-4DE4-932D-A03C96B9B05E_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:3174FB35-052C-4DE4-932D-A03C96B9B05E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3174FB35-052C-4DE4-932D-A03C96B9B05E_prs|trigger=none}destination
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:3174FB35-052C-4DE4-932D-A03C96B9B05E_ret|text=|trigger=button}{sub-section}{sub-section:3174FB35-052C-4DE4-932D-A03C96B9B05E_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:3174FB35-052C-4DE4-932D-A03C96B9B05E_see|text=|trigger=button}{sub-section}{sub-section:3174FB35-052C-4DE4-932D-A03C96B9B05E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3174FB35-052C-4DE4-932D-A03C96B9B05E_see|text=|trigger=button}{sub-section}{sub-section:3174FB35-052C-4DE4-932D-A03C96B9B05E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3174FB35-052C-4DE4-932D-A03C96B9B05E_sam|text=|trigger=button}{sub-section}{sub-section:3174FB35-052C-4DE4-932D-A03C96B9B05E_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=2AF0E6F2-A1A4-4841-9891-8E2B4592EC5F}{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:2AF0E6F2-A1A4-4841-9891-8E2B4592EC5F_des|text=|trigger=button}{sub-section}{sub-section:2AF0E6F2-A1A4-4841-9891-8E2B4592EC5F_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:2AF0E6F2-A1A4-4841-9891-8E2B4592EC5F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2AF0E6F2-A1A4-4841-9891-8E2B4592EC5F_prs|trigger=none}date
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:2AF0E6F2-A1A4-4841-9891-8E2B4592EC5F_ret|text=|trigger=button}{sub-section}{sub-section:2AF0E6F2-A1A4-4841-9891-8E2B4592EC5F_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2AF0E6F2-A1A4-4841-9891-8E2B4592EC5F_see|text=|trigger=button}{sub-section}{sub-section:2AF0E6F2-A1A4-4841-9891-8E2B4592EC5F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2AF0E6F2-A1A4-4841-9891-8E2B4592EC5F_see|text=|trigger=button}{sub-section}{sub-section:2AF0E6F2-A1A4-4841-9891-8E2B4592EC5F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2AF0E6F2-A1A4-4841-9891-8E2B4592EC5F_sam|text=|trigger=button}{sub-section}{sub-section:2AF0E6F2-A1A4-4841-9891-8E2B4592EC5F_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=7D57F8D2-7C94-4948-8952-F4ECB0BE6540}{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:7D57F8D2-7C94-4948-8952-F4ECB0BE6540_des|text=|trigger=button}{sub-section}{sub-section:7D57F8D2-7C94-4948-8952-F4ECB0BE6540_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:7D57F8D2-7C94-4948-8952-F4ECB0BE6540_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7D57F8D2-7C94-4948-8952-F4ECB0BE6540_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:7D57F8D2-7C94-4948-8952-F4ECB0BE6540_ret|text=|trigger=button}{sub-section}{sub-section:7D57F8D2-7C94-4948-8952-F4ECB0BE6540_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:7D57F8D2-7C94-4948-8952-F4ECB0BE6540_see|text=|trigger=button}{sub-section}{sub-section:7D57F8D2-7C94-4948-8952-F4ECB0BE6540_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7D57F8D2-7C94-4948-8952-F4ECB0BE6540_see|text=|trigger=button}{sub-section}{sub-section:7D57F8D2-7C94-4948-8952-F4ECB0BE6540_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7D57F8D2-7C94-4948-8952-F4ECB0BE6540_sam|text=|trigger=button}{sub-section}{sub-section:7D57F8D2-7C94-4948-8952-F4ECB0BE6540_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=C776617C-4A87-4369-B5F4-C0C73C3AE5E4}{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:C776617C-4A87-4369-B5F4-C0C73C3AE5E4_des|text=|trigger=button}{sub-section}{sub-section:C776617C-4A87-4369-B5F4-C0C73C3AE5E4_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:C776617C-4A87-4369-B5F4-C0C73C3AE5E4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C776617C-4A87-4369-B5F4-C0C73C3AE5E4_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C776617C-4A87-4369-B5F4-C0C73C3AE5E4_ret|text=|trigger=button}{sub-section}{sub-section:C776617C-4A87-4369-B5F4-C0C73C3AE5E4_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C776617C-4A87-4369-B5F4-C0C73C3AE5E4_see|text=|trigger=button}{sub-section}{sub-section:C776617C-4A87-4369-B5F4-C0C73C3AE5E4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C776617C-4A87-4369-B5F4-C0C73C3AE5E4_see|text=|trigger=button}{sub-section}{sub-section:C776617C-4A87-4369-B5F4-C0C73C3AE5E4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C776617C-4A87-4369-B5F4-C0C73C3AE5E4_sam|text=|trigger=button}{sub-section}{sub-section:C776617C-4A87-4369-B5F4-C0C73C3AE5E4_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}