{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#canRead]\()
Returns true if the file exists and is readable (has access to it).{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#canWrite]\()
Returns true if the file exists and can be modified.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#createNewFile]\()
Creates the file on disk if needed.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#deleteFile]\()
Deletes the file from the disk if possible.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#exists]\()
Returns true if the file/directory exists on the filesystem.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#getAbsoluteFile]\()
Returns a JSFile instance that corresponds to the absolute form of this pathname.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getAbsolutePath]\()
Returns a String representation of the absolute form of this pathname.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getContentType]\()
Returns the contenttype of this file, like for example 'application/pdf'.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getName]\()
Returns the name of the file.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getParent]\()
Returns the String representation of the path of the parent of this file.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]{td}{td}[#getParentFile]\()
Returns a JSFile instance that corresponds to the parent of this file.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getPath]\()
Returns a String holding the path to the file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isAbsolute]\()
Returns true if the path is absolute.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isDirectory]\()
Returns true if the file is a directory.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isFile]\()
Returns true if the file is a file and not a regular file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isHidden]\()
Returns true if the file is hidden (a file system attribute).{td}{tr}{tbody}{tbody}{tr}{td}[Date]{td}{td}[#lastModified]\()
Returns the time/date of the last modification on the file.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#list]\()
Returns an array of strings naming the files and directories located inside the file, if the file is a directory.{td}{tr}{tbody}{tbody}{tr}{td}[JSFile]\[]{td}{td}[#listFiles]\()
Returns an array of JSFiles naming the files and directories located inside the file, if the file is a directory.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#mkdir]\()
Creates a directory on disk if possible.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#mkdirs]\()
Creates a directory on disk, together with all its parent directories, if possible.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#renameTo]\(destination)
Renames the file to a different name.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#setLastModified]\(date)
Sets the date/time of the last modification on the file.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#setReadOnly]\()
Sets the readonly attribute of the file/directory.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#size]\()
Returns the size in bytes of the file.{td}{tr}{tbody}{table}\\{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=2AD4B28D-870A-4522-802C-9906E40C60CB}{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:2AD4B28D-870A-4522-802C-9906E40C60CB_des|text=|trigger=button}{sub-section}{sub-section:2AD4B28D-870A-4522-802C-9906E40C60CB_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:2AD4B28D-870A-4522-802C-9906E40C60CB_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2AD4B28D-870A-4522-802C-9906E40C60CB_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:2AD4B28D-870A-4522-802C-9906E40C60CB_ret|text=|trigger=button}{sub-section}{sub-section:2AD4B28D-870A-4522-802C-9906E40C60CB_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2AD4B28D-870A-4522-802C-9906E40C60CB_see|text=|trigger=button}{sub-section}{sub-section:2AD4B28D-870A-4522-802C-9906E40C60CB_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2AD4B28D-870A-4522-802C-9906E40C60CB_see|text=|trigger=button}{sub-section}{sub-section:2AD4B28D-870A-4522-802C-9906E40C60CB_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2AD4B28D-870A-4522-802C-9906E40C60CB_sam|text=|trigger=button}{sub-section}{sub-section:2AD4B28D-870A-4522-802C-9906E40C60CB_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=10C60B0C-9B58-46A1-9BBE-48D74B4A5FC2}{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:10C60B0C-9B58-46A1-9BBE-48D74B4A5FC2_des|text=|trigger=button}{sub-section}{sub-section:10C60B0C-9B58-46A1-9BBE-48D74B4A5FC2_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:10C60B0C-9B58-46A1-9BBE-48D74B4A5FC2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:10C60B0C-9B58-46A1-9BBE-48D74B4A5FC2_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:10C60B0C-9B58-46A1-9BBE-48D74B4A5FC2_ret|text=|trigger=button}{sub-section}{sub-section:10C60B0C-9B58-46A1-9BBE-48D74B4A5FC2_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:10C60B0C-9B58-46A1-9BBE-48D74B4A5FC2_see|text=|trigger=button}{sub-section}{sub-section:10C60B0C-9B58-46A1-9BBE-48D74B4A5FC2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:10C60B0C-9B58-46A1-9BBE-48D74B4A5FC2_see|text=|trigger=button}{sub-section}{sub-section:10C60B0C-9B58-46A1-9BBE-48D74B4A5FC2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:10C60B0C-9B58-46A1-9BBE-48D74B4A5FC2_sam|text=|trigger=button}{sub-section}{sub-section:10C60B0C-9B58-46A1-9BBE-48D74B4A5FC2_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=FFD9D44A-E5AF-4D63-90B5-84CAAD8AD9CB}{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:FFD9D44A-E5AF-4D63-90B5-84CAAD8AD9CB_des|text=|trigger=button}{sub-section}{sub-section:FFD9D44A-E5AF-4D63-90B5-84CAAD8AD9CB_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:FFD9D44A-E5AF-4D63-90B5-84CAAD8AD9CB_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FFD9D44A-E5AF-4D63-90B5-84CAAD8AD9CB_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:FFD9D44A-E5AF-4D63-90B5-84CAAD8AD9CB_ret|text=|trigger=button}{sub-section}{sub-section:FFD9D44A-E5AF-4D63-90B5-84CAAD8AD9CB_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FFD9D44A-E5AF-4D63-90B5-84CAAD8AD9CB_see|text=|trigger=button}{sub-section}{sub-section:FFD9D44A-E5AF-4D63-90B5-84CAAD8AD9CB_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FFD9D44A-E5AF-4D63-90B5-84CAAD8AD9CB_see|text=|trigger=button}{sub-section}{sub-section:FFD9D44A-E5AF-4D63-90B5-84CAAD8AD9CB_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FFD9D44A-E5AF-4D63-90B5-84CAAD8AD9CB_sam|text=|trigger=button}{sub-section}{sub-section:FFD9D44A-E5AF-4D63-90B5-84CAAD8AD9CB_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=3E406478-E375-41A4-8D1E-A008336F5CCF}{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:3E406478-E375-41A4-8D1E-A008336F5CCF_des|text=|trigger=button}{sub-section}{sub-section:3E406478-E375-41A4-8D1E-A008336F5CCF_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:3E406478-E375-41A4-8D1E-A008336F5CCF_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3E406478-E375-41A4-8D1E-A008336F5CCF_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:3E406478-E375-41A4-8D1E-A008336F5CCF_ret|text=|trigger=button}{sub-section}{sub-section:3E406478-E375-41A4-8D1E-A008336F5CCF_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:3E406478-E375-41A4-8D1E-A008336F5CCF_see|text=|trigger=button}{sub-section}{sub-section:3E406478-E375-41A4-8D1E-A008336F5CCF_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3E406478-E375-41A4-8D1E-A008336F5CCF_see|text=|trigger=button}{sub-section}{sub-section:3E406478-E375-41A4-8D1E-A008336F5CCF_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3E406478-E375-41A4-8D1E-A008336F5CCF_sam|text=|trigger=button}{sub-section}{sub-section:3E406478-E375-41A4-8D1E-A008336F5CCF_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=8755B758-6C11-40EB-B3AE-A1F9B331DC41}{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:8755B758-6C11-40EB-B3AE-A1F9B331DC41_des|text=|trigger=button}{sub-section}{sub-section:8755B758-6C11-40EB-B3AE-A1F9B331DC41_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:8755B758-6C11-40EB-B3AE-A1F9B331DC41_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8755B758-6C11-40EB-B3AE-A1F9B331DC41_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:8755B758-6C11-40EB-B3AE-A1F9B331DC41_ret|text=|trigger=button}{sub-section}{sub-section:8755B758-6C11-40EB-B3AE-A1F9B331DC41_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8755B758-6C11-40EB-B3AE-A1F9B331DC41_see|text=|trigger=button}{sub-section}{sub-section:8755B758-6C11-40EB-B3AE-A1F9B331DC41_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8755B758-6C11-40EB-B3AE-A1F9B331DC41_see|text=|trigger=button}{sub-section}{sub-section:8755B758-6C11-40EB-B3AE-A1F9B331DC41_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8755B758-6C11-40EB-B3AE-A1F9B331DC41_sam|text=|trigger=button}{sub-section}{sub-section:8755B758-6C11-40EB-B3AE-A1F9B331DC41_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=11F0FCAF-6592-442C-A1B7-DBB99502523F}{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:11F0FCAF-6592-442C-A1B7-DBB99502523F_des|text=|trigger=button}{sub-section}{sub-section:11F0FCAF-6592-442C-A1B7-DBB99502523F_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:11F0FCAF-6592-442C-A1B7-DBB99502523F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:11F0FCAF-6592-442C-A1B7-DBB99502523F_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:11F0FCAF-6592-442C-A1B7-DBB99502523F_ret|text=|trigger=button}{sub-section}{sub-section:11F0FCAF-6592-442C-A1B7-DBB99502523F_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:11F0FCAF-6592-442C-A1B7-DBB99502523F_see|text=|trigger=button}{sub-section}{sub-section:11F0FCAF-6592-442C-A1B7-DBB99502523F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:11F0FCAF-6592-442C-A1B7-DBB99502523F_see|text=|trigger=button}{sub-section}{sub-section:11F0FCAF-6592-442C-A1B7-DBB99502523F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:11F0FCAF-6592-442C-A1B7-DBB99502523F_sam|text=|trigger=button}{sub-section}{sub-section:11F0FCAF-6592-442C-A1B7-DBB99502523F_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=5AA5C9BD-C07F-42A8-B048-504C949C2E59}{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:5AA5C9BD-C07F-42A8-B048-504C949C2E59_des|text=|trigger=button}{sub-section}{sub-section:5AA5C9BD-C07F-42A8-B048-504C949C2E59_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:5AA5C9BD-C07F-42A8-B048-504C949C2E59_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5AA5C9BD-C07F-42A8-B048-504C949C2E59_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:5AA5C9BD-C07F-42A8-B048-504C949C2E59_ret|text=|trigger=button}{sub-section}{sub-section:5AA5C9BD-C07F-42A8-B048-504C949C2E59_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5AA5C9BD-C07F-42A8-B048-504C949C2E59_see|text=|trigger=button}{sub-section}{sub-section:5AA5C9BD-C07F-42A8-B048-504C949C2E59_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5AA5C9BD-C07F-42A8-B048-504C949C2E59_see|text=|trigger=button}{sub-section}{sub-section:5AA5C9BD-C07F-42A8-B048-504C949C2E59_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5AA5C9BD-C07F-42A8-B048-504C949C2E59_sam|text=|trigger=button}{sub-section}{sub-section:5AA5C9BD-C07F-42A8-B048-504C949C2E59_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=B5C87ED8-7C2B-46D9-AE80-584DF0372040}{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:B5C87ED8-7C2B-46D9-AE80-584DF0372040_des|text=|trigger=button}{sub-section}{sub-section:B5C87ED8-7C2B-46D9-AE80-584DF0372040_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:B5C87ED8-7C2B-46D9-AE80-584DF0372040_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B5C87ED8-7C2B-46D9-AE80-584DF0372040_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:B5C87ED8-7C2B-46D9-AE80-584DF0372040_ret|text=|trigger=button}{sub-section}{sub-section:B5C87ED8-7C2B-46D9-AE80-584DF0372040_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B5C87ED8-7C2B-46D9-AE80-584DF0372040_see|text=|trigger=button}{sub-section}{sub-section:B5C87ED8-7C2B-46D9-AE80-584DF0372040_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B5C87ED8-7C2B-46D9-AE80-584DF0372040_see|text=|trigger=button}{sub-section}{sub-section:B5C87ED8-7C2B-46D9-AE80-584DF0372040_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B5C87ED8-7C2B-46D9-AE80-584DF0372040_sam|text=|trigger=button}{sub-section}{sub-section:B5C87ED8-7C2B-46D9-AE80-584DF0372040_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=36AEEC9B-3289-4FC6-9C9D-C46A7C286340}{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:36AEEC9B-3289-4FC6-9C9D-C46A7C286340_des|text=|trigger=button}{sub-section}{sub-section:36AEEC9B-3289-4FC6-9C9D-C46A7C286340_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:36AEEC9B-3289-4FC6-9C9D-C46A7C286340_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:36AEEC9B-3289-4FC6-9C9D-C46A7C286340_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:36AEEC9B-3289-4FC6-9C9D-C46A7C286340_ret|text=|trigger=button}{sub-section}{sub-section:36AEEC9B-3289-4FC6-9C9D-C46A7C286340_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:36AEEC9B-3289-4FC6-9C9D-C46A7C286340_see|text=|trigger=button}{sub-section}{sub-section:36AEEC9B-3289-4FC6-9C9D-C46A7C286340_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:36AEEC9B-3289-4FC6-9C9D-C46A7C286340_see|text=|trigger=button}{sub-section}{sub-section:36AEEC9B-3289-4FC6-9C9D-C46A7C286340_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:36AEEC9B-3289-4FC6-9C9D-C46A7C286340_sam|text=|trigger=button}{sub-section}{sub-section:36AEEC9B-3289-4FC6-9C9D-C46A7C286340_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=C11A2825-7FB3-4E6E-8890-0138B17109C4}{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:C11A2825-7FB3-4E6E-8890-0138B17109C4_des|text=|trigger=button}{sub-section}{sub-section:C11A2825-7FB3-4E6E-8890-0138B17109C4_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:C11A2825-7FB3-4E6E-8890-0138B17109C4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C11A2825-7FB3-4E6E-8890-0138B17109C4_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C11A2825-7FB3-4E6E-8890-0138B17109C4_ret|text=|trigger=button}{sub-section}{sub-section:C11A2825-7FB3-4E6E-8890-0138B17109C4_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C11A2825-7FB3-4E6E-8890-0138B17109C4_see|text=|trigger=button}{sub-section}{sub-section:C11A2825-7FB3-4E6E-8890-0138B17109C4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C11A2825-7FB3-4E6E-8890-0138B17109C4_see|text=|trigger=button}{sub-section}{sub-section:C11A2825-7FB3-4E6E-8890-0138B17109C4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C11A2825-7FB3-4E6E-8890-0138B17109C4_sam|text=|trigger=button}{sub-section}{sub-section:C11A2825-7FB3-4E6E-8890-0138B17109C4_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=E9A6D460-D8CC-40A9-B849-4E1DACE3914E}{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:E9A6D460-D8CC-40A9-B849-4E1DACE3914E_des|text=|trigger=button}{sub-section}{sub-section:E9A6D460-D8CC-40A9-B849-4E1DACE3914E_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:E9A6D460-D8CC-40A9-B849-4E1DACE3914E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E9A6D460-D8CC-40A9-B849-4E1DACE3914E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:E9A6D460-D8CC-40A9-B849-4E1DACE3914E_ret|text=|trigger=button}{sub-section}{sub-section:E9A6D460-D8CC-40A9-B849-4E1DACE3914E_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E9A6D460-D8CC-40A9-B849-4E1DACE3914E_see|text=|trigger=button}{sub-section}{sub-section:E9A6D460-D8CC-40A9-B849-4E1DACE3914E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E9A6D460-D8CC-40A9-B849-4E1DACE3914E_see|text=|trigger=button}{sub-section}{sub-section:E9A6D460-D8CC-40A9-B849-4E1DACE3914E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E9A6D460-D8CC-40A9-B849-4E1DACE3914E_sam|text=|trigger=button}{sub-section}{sub-section:E9A6D460-D8CC-40A9-B849-4E1DACE3914E_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=C508CCFB-D64F-41A8-95C6-2350777A8390}{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:C508CCFB-D64F-41A8-95C6-2350777A8390_des|text=|trigger=button}{sub-section}{sub-section:C508CCFB-D64F-41A8-95C6-2350777A8390_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:C508CCFB-D64F-41A8-95C6-2350777A8390_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C508CCFB-D64F-41A8-95C6-2350777A8390_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C508CCFB-D64F-41A8-95C6-2350777A8390_ret|text=|trigger=button}{sub-section}{sub-section:C508CCFB-D64F-41A8-95C6-2350777A8390_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C508CCFB-D64F-41A8-95C6-2350777A8390_see|text=|trigger=button}{sub-section}{sub-section:C508CCFB-D64F-41A8-95C6-2350777A8390_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C508CCFB-D64F-41A8-95C6-2350777A8390_see|text=|trigger=button}{sub-section}{sub-section:C508CCFB-D64F-41A8-95C6-2350777A8390_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C508CCFB-D64F-41A8-95C6-2350777A8390_sam|text=|trigger=button}{sub-section}{sub-section:C508CCFB-D64F-41A8-95C6-2350777A8390_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=C3D41219-3E12-4CE5-94E4-F9117CFB3BD7}{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:C3D41219-3E12-4CE5-94E4-F9117CFB3BD7_des|text=|trigger=button}{sub-section}{sub-section:C3D41219-3E12-4CE5-94E4-F9117CFB3BD7_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:C3D41219-3E12-4CE5-94E4-F9117CFB3BD7_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C3D41219-3E12-4CE5-94E4-F9117CFB3BD7_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C3D41219-3E12-4CE5-94E4-F9117CFB3BD7_ret|text=|trigger=button}{sub-section}{sub-section:C3D41219-3E12-4CE5-94E4-F9117CFB3BD7_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C3D41219-3E12-4CE5-94E4-F9117CFB3BD7_see|text=|trigger=button}{sub-section}{sub-section:C3D41219-3E12-4CE5-94E4-F9117CFB3BD7_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C3D41219-3E12-4CE5-94E4-F9117CFB3BD7_see|text=|trigger=button}{sub-section}{sub-section:C3D41219-3E12-4CE5-94E4-F9117CFB3BD7_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C3D41219-3E12-4CE5-94E4-F9117CFB3BD7_sam|text=|trigger=button}{sub-section}{sub-section:C3D41219-3E12-4CE5-94E4-F9117CFB3BD7_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=FC138931-DAE7-4953-A67E-82F546803AC8}{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:FC138931-DAE7-4953-A67E-82F546803AC8_des|text=|trigger=button}{sub-section}{sub-section:FC138931-DAE7-4953-A67E-82F546803AC8_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:FC138931-DAE7-4953-A67E-82F546803AC8_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FC138931-DAE7-4953-A67E-82F546803AC8_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:FC138931-DAE7-4953-A67E-82F546803AC8_ret|text=|trigger=button}{sub-section}{sub-section:FC138931-DAE7-4953-A67E-82F546803AC8_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FC138931-DAE7-4953-A67E-82F546803AC8_see|text=|trigger=button}{sub-section}{sub-section:FC138931-DAE7-4953-A67E-82F546803AC8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FC138931-DAE7-4953-A67E-82F546803AC8_see|text=|trigger=button}{sub-section}{sub-section:FC138931-DAE7-4953-A67E-82F546803AC8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FC138931-DAE7-4953-A67E-82F546803AC8_sam|text=|trigger=button}{sub-section}{sub-section:FC138931-DAE7-4953-A67E-82F546803AC8_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=E0FD05F7-5F29-4A9D-AFBF-D2220E35CAD9}{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:E0FD05F7-5F29-4A9D-AFBF-D2220E35CAD9_des|text=|trigger=button}{sub-section}{sub-section:E0FD05F7-5F29-4A9D-AFBF-D2220E35CAD9_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:E0FD05F7-5F29-4A9D-AFBF-D2220E35CAD9_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E0FD05F7-5F29-4A9D-AFBF-D2220E35CAD9_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:E0FD05F7-5F29-4A9D-AFBF-D2220E35CAD9_ret|text=|trigger=button}{sub-section}{sub-section:E0FD05F7-5F29-4A9D-AFBF-D2220E35CAD9_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E0FD05F7-5F29-4A9D-AFBF-D2220E35CAD9_see|text=|trigger=button}{sub-section}{sub-section:E0FD05F7-5F29-4A9D-AFBF-D2220E35CAD9_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E0FD05F7-5F29-4A9D-AFBF-D2220E35CAD9_see|text=|trigger=button}{sub-section}{sub-section:E0FD05F7-5F29-4A9D-AFBF-D2220E35CAD9_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E0FD05F7-5F29-4A9D-AFBF-D2220E35CAD9_sam|text=|trigger=button}{sub-section}{sub-section:E0FD05F7-5F29-4A9D-AFBF-D2220E35CAD9_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=BF811D64-9B74-455A-A0A2-B30516840B62}{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:BF811D64-9B74-455A-A0A2-B30516840B62_des|text=|trigger=button}{sub-section}{sub-section:BF811D64-9B74-455A-A0A2-B30516840B62_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:BF811D64-9B74-455A-A0A2-B30516840B62_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BF811D64-9B74-455A-A0A2-B30516840B62_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:BF811D64-9B74-455A-A0A2-B30516840B62_ret|text=|trigger=button}{sub-section}{sub-section:BF811D64-9B74-455A-A0A2-B30516840B62_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BF811D64-9B74-455A-A0A2-B30516840B62_see|text=|trigger=button}{sub-section}{sub-section:BF811D64-9B74-455A-A0A2-B30516840B62_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BF811D64-9B74-455A-A0A2-B30516840B62_see|text=|trigger=button}{sub-section}{sub-section:BF811D64-9B74-455A-A0A2-B30516840B62_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BF811D64-9B74-455A-A0A2-B30516840B62_sam|text=|trigger=button}{sub-section}{sub-section:BF811D64-9B74-455A-A0A2-B30516840B62_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=F3560ECD-82AE-4010-8F10-75A48247A01E}{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:F3560ECD-82AE-4010-8F10-75A48247A01E_des|text=|trigger=button}{sub-section}{sub-section:F3560ECD-82AE-4010-8F10-75A48247A01E_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:F3560ECD-82AE-4010-8F10-75A48247A01E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F3560ECD-82AE-4010-8F10-75A48247A01E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F3560ECD-82AE-4010-8F10-75A48247A01E_ret|text=|trigger=button}{sub-section}{sub-section:F3560ECD-82AE-4010-8F10-75A48247A01E_ret|trigger=none|class=sIndent}[Date]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F3560ECD-82AE-4010-8F10-75A48247A01E_see|text=|trigger=button}{sub-section}{sub-section:F3560ECD-82AE-4010-8F10-75A48247A01E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F3560ECD-82AE-4010-8F10-75A48247A01E_see|text=|trigger=button}{sub-section}{sub-section:F3560ECD-82AE-4010-8F10-75A48247A01E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F3560ECD-82AE-4010-8F10-75A48247A01E_sam|text=|trigger=button}{sub-section}{sub-section:F3560ECD-82AE-4010-8F10-75A48247A01E_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=23885A8F-D0BA-466F-AA48-FA09957053F5}{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:23885A8F-D0BA-466F-AA48-FA09957053F5_des|text=|trigger=button}{sub-section}{sub-section:23885A8F-D0BA-466F-AA48-FA09957053F5_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:23885A8F-D0BA-466F-AA48-FA09957053F5_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:23885A8F-D0BA-466F-AA48-FA09957053F5_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:23885A8F-D0BA-466F-AA48-FA09957053F5_ret|text=|trigger=button}{sub-section}{sub-section:23885A8F-D0BA-466F-AA48-FA09957053F5_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:23885A8F-D0BA-466F-AA48-FA09957053F5_see|text=|trigger=button}{sub-section}{sub-section:23885A8F-D0BA-466F-AA48-FA09957053F5_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:23885A8F-D0BA-466F-AA48-FA09957053F5_see|text=|trigger=button}{sub-section}{sub-section:23885A8F-D0BA-466F-AA48-FA09957053F5_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:23885A8F-D0BA-466F-AA48-FA09957053F5_sam|text=|trigger=button}{sub-section}{sub-section:23885A8F-D0BA-466F-AA48-FA09957053F5_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=A378CF83-20D6-4521-8809-65135172BAB4}{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:A378CF83-20D6-4521-8809-65135172BAB4_des|text=|trigger=button}{sub-section}{sub-section:A378CF83-20D6-4521-8809-65135172BAB4_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:A378CF83-20D6-4521-8809-65135172BAB4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A378CF83-20D6-4521-8809-65135172BAB4_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A378CF83-20D6-4521-8809-65135172BAB4_ret|text=|trigger=button}{sub-section}{sub-section:A378CF83-20D6-4521-8809-65135172BAB4_ret|trigger=none|class=sIndent}[JSFile]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A378CF83-20D6-4521-8809-65135172BAB4_see|text=|trigger=button}{sub-section}{sub-section:A378CF83-20D6-4521-8809-65135172BAB4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A378CF83-20D6-4521-8809-65135172BAB4_see|text=|trigger=button}{sub-section}{sub-section:A378CF83-20D6-4521-8809-65135172BAB4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A378CF83-20D6-4521-8809-65135172BAB4_sam|text=|trigger=button}{sub-section}{sub-section:A378CF83-20D6-4521-8809-65135172BAB4_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=C3601D21-9ACF-4497-BBA6-AEC8E9015A68}{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:C3601D21-9ACF-4497-BBA6-AEC8E9015A68_des|text=|trigger=button}{sub-section}{sub-section:C3601D21-9ACF-4497-BBA6-AEC8E9015A68_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:C3601D21-9ACF-4497-BBA6-AEC8E9015A68_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C3601D21-9ACF-4497-BBA6-AEC8E9015A68_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C3601D21-9ACF-4497-BBA6-AEC8E9015A68_ret|text=|trigger=button}{sub-section}{sub-section:C3601D21-9ACF-4497-BBA6-AEC8E9015A68_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C3601D21-9ACF-4497-BBA6-AEC8E9015A68_see|text=|trigger=button}{sub-section}{sub-section:C3601D21-9ACF-4497-BBA6-AEC8E9015A68_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C3601D21-9ACF-4497-BBA6-AEC8E9015A68_see|text=|trigger=button}{sub-section}{sub-section:C3601D21-9ACF-4497-BBA6-AEC8E9015A68_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C3601D21-9ACF-4497-BBA6-AEC8E9015A68_sam|text=|trigger=button}{sub-section}{sub-section:C3601D21-9ACF-4497-BBA6-AEC8E9015A68_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=4AF8EFD2-F925-47C4-BF72-192F7AD6174D}{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:4AF8EFD2-F925-47C4-BF72-192F7AD6174D_des|text=|trigger=button}{sub-section}{sub-section:4AF8EFD2-F925-47C4-BF72-192F7AD6174D_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:4AF8EFD2-F925-47C4-BF72-192F7AD6174D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4AF8EFD2-F925-47C4-BF72-192F7AD6174D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:4AF8EFD2-F925-47C4-BF72-192F7AD6174D_ret|text=|trigger=button}{sub-section}{sub-section:4AF8EFD2-F925-47C4-BF72-192F7AD6174D_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4AF8EFD2-F925-47C4-BF72-192F7AD6174D_see|text=|trigger=button}{sub-section}{sub-section:4AF8EFD2-F925-47C4-BF72-192F7AD6174D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4AF8EFD2-F925-47C4-BF72-192F7AD6174D_see|text=|trigger=button}{sub-section}{sub-section:4AF8EFD2-F925-47C4-BF72-192F7AD6174D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4AF8EFD2-F925-47C4-BF72-192F7AD6174D_sam|text=|trigger=button}{sub-section}{sub-section:4AF8EFD2-F925-47C4-BF72-192F7AD6174D_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=4079E58B-E426-41A3-8356-72F5C4CC908E}{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:4079E58B-E426-41A3-8356-72F5C4CC908E_des|text=|trigger=button}{sub-section}{sub-section:4079E58B-E426-41A3-8356-72F5C4CC908E_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:4079E58B-E426-41A3-8356-72F5C4CC908E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4079E58B-E426-41A3-8356-72F5C4CC908E_prs|trigger=none}destination
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:4079E58B-E426-41A3-8356-72F5C4CC908E_ret|text=|trigger=button}{sub-section}{sub-section:4079E58B-E426-41A3-8356-72F5C4CC908E_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4079E58B-E426-41A3-8356-72F5C4CC908E_see|text=|trigger=button}{sub-section}{sub-section:4079E58B-E426-41A3-8356-72F5C4CC908E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4079E58B-E426-41A3-8356-72F5C4CC908E_see|text=|trigger=button}{sub-section}{sub-section:4079E58B-E426-41A3-8356-72F5C4CC908E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4079E58B-E426-41A3-8356-72F5C4CC908E_sam|text=|trigger=button}{sub-section}{sub-section:4079E58B-E426-41A3-8356-72F5C4CC908E_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=CB52B8B7-41C2-4555-BBD8-DB9B70731849}{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:CB52B8B7-41C2-4555-BBD8-DB9B70731849_des|text=|trigger=button}{sub-section}{sub-section:CB52B8B7-41C2-4555-BBD8-DB9B70731849_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:CB52B8B7-41C2-4555-BBD8-DB9B70731849_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CB52B8B7-41C2-4555-BBD8-DB9B70731849_prs|trigger=none}date
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:CB52B8B7-41C2-4555-BBD8-DB9B70731849_ret|text=|trigger=button}{sub-section}{sub-section:CB52B8B7-41C2-4555-BBD8-DB9B70731849_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:CB52B8B7-41C2-4555-BBD8-DB9B70731849_see|text=|trigger=button}{sub-section}{sub-section:CB52B8B7-41C2-4555-BBD8-DB9B70731849_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:CB52B8B7-41C2-4555-BBD8-DB9B70731849_see|text=|trigger=button}{sub-section}{sub-section:CB52B8B7-41C2-4555-BBD8-DB9B70731849_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:CB52B8B7-41C2-4555-BBD8-DB9B70731849_sam|text=|trigger=button}{sub-section}{sub-section:CB52B8B7-41C2-4555-BBD8-DB9B70731849_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=35B82E08-2EDA-4C40-9761-E21AE6655600}{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:35B82E08-2EDA-4C40-9761-E21AE6655600_des|text=|trigger=button}{sub-section}{sub-section:35B82E08-2EDA-4C40-9761-E21AE6655600_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:35B82E08-2EDA-4C40-9761-E21AE6655600_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:35B82E08-2EDA-4C40-9761-E21AE6655600_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:35B82E08-2EDA-4C40-9761-E21AE6655600_ret|text=|trigger=button}{sub-section}{sub-section:35B82E08-2EDA-4C40-9761-E21AE6655600_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:35B82E08-2EDA-4C40-9761-E21AE6655600_see|text=|trigger=button}{sub-section}{sub-section:35B82E08-2EDA-4C40-9761-E21AE6655600_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:35B82E08-2EDA-4C40-9761-E21AE6655600_see|text=|trigger=button}{sub-section}{sub-section:35B82E08-2EDA-4C40-9761-E21AE6655600_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:35B82E08-2EDA-4C40-9761-E21AE6655600_sam|text=|trigger=button}{sub-section}{sub-section:35B82E08-2EDA-4C40-9761-E21AE6655600_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=84859CA9-D557-47A1-B476-B56CBEFD68A3}{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:84859CA9-D557-47A1-B476-B56CBEFD68A3_des|text=|trigger=button}{sub-section}{sub-section:84859CA9-D557-47A1-B476-B56CBEFD68A3_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:84859CA9-D557-47A1-B476-B56CBEFD68A3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:84859CA9-D557-47A1-B476-B56CBEFD68A3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:84859CA9-D557-47A1-B476-B56CBEFD68A3_ret|text=|trigger=button}{sub-section}{sub-section:84859CA9-D557-47A1-B476-B56CBEFD68A3_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:84859CA9-D557-47A1-B476-B56CBEFD68A3_see|text=|trigger=button}{sub-section}{sub-section:84859CA9-D557-47A1-B476-B56CBEFD68A3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:84859CA9-D557-47A1-B476-B56CBEFD68A3_see|text=|trigger=button}{sub-section}{sub-section:84859CA9-D557-47A1-B476-B56CBEFD68A3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:84859CA9-D557-47A1-B476-B56CBEFD68A3_sam|text=|trigger=button}{sub-section}{sub-section:84859CA9-D557-47A1-B476-B56CBEFD68A3_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}