Child pages
  • JSFile

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{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=2AD4B28D33168F92-870A318F-45224926-802CB4C3-9906E40C60CB4FFAC063A3E1}{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:2AD4B28D33168F92-870A318F-45224926-802CB4C3-9906E40C60CB4FFAC063A3E1_des|text=|trigger=button}{sub-section}{sub-section:2AD4B28D33168F92-870A318F-45224926-802CB4C3-9906E40C60CB4FFAC063A3E1_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:2AD4B28D33168F92-870A318F-45224926-802CB4C3-9906E40C60CB4FFAC063A3E1_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2AD4B28D33168F92-870A318F-45224926-802CB4C3-9906E40C60CB4FFAC063A3E1_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:2AD4B28D33168F92-870A318F-45224926-802CB4C3-9906E40C60CB4FFAC063A3E1_ret|text=|trigger=button}{sub-section}{sub-section:2AD4B28D33168F92-870A318F-45224926-802CB4C3-9906E40C60CB4FFAC063A3E1_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2AD4B28D33168F92-870A318F-45224926-802CB4C3-9906E40C60CB4FFAC063A3E1_see|text=|trigger=button}{sub-section}{sub-section:2AD4B28D33168F92-870A318F-45224926-802CB4C3-9906E40C60CB4FFAC063A3E1_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2AD4B28D33168F92-870A318F-45224926-802CB4C3-9906E40C60CB4FFAC063A3E1_see|text=|trigger=button}{sub-section}{sub-section:2AD4B28D33168F92-870A318F-45224926-802CB4C3-9906E40C60CB4FFAC063A3E1_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2AD4B28D33168F92-870A318F-45224926-802CB4C3-9906E40C60CB4FFAC063A3E1_sam|text=|trigger=button}{sub-section}{sub-section:2AD4B28D33168F92-870A318F-45224926-802CB4C3-9906E40C60CB4FFAC063A3E1_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=10C60B0CF7F3EEC1-9B5889D8-46A14CCB-9BBEACED-48D74B4A5FC27398CDB94E45}{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:10C60B0CF7F3EEC1-9B5889D8-46A14CCB-9BBEACED-48D74B4A5FC27398CDB94E45_des|text=|trigger=button}{sub-section}{sub-section:10C60B0CF7F3EEC1-9B5889D8-46A14CCB-9BBEACED-48D74B4A5FC27398CDB94E45_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:10C60B0CF7F3EEC1-9B5889D8-46A14CCB-9BBEACED-48D74B4A5FC27398CDB94E45_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:10C60B0CF7F3EEC1-9B5889D8-46A14CCB-9BBEACED-48D74B4A5FC27398CDB94E45_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:10C60B0CF7F3EEC1-9B5889D8-46A14CCB-9BBEACED-48D74B4A5FC27398CDB94E45_ret|text=|trigger=button}{sub-section}{sub-section:10C60B0CF7F3EEC1-9B5889D8-46A14CCB-9BBEACED-48D74B4A5FC27398CDB94E45_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:10C60B0CF7F3EEC1-9B5889D8-46A14CCB-9BBEACED-48D74B4A5FC27398CDB94E45_see|text=|trigger=button}{sub-section}{sub-section:10C60B0CF7F3EEC1-9B5889D8-46A14CCB-9BBEACED-48D74B4A5FC27398CDB94E45_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:10C60B0CF7F3EEC1-9B5889D8-46A14CCB-9BBEACED-48D74B4A5FC27398CDB94E45_see|text=|trigger=button}{sub-section}{sub-section:10C60B0CF7F3EEC1-9B5889D8-46A14CCB-9BBEACED-48D74B4A5FC27398CDB94E45_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:10C60B0CF7F3EEC1-9B5889D8-46A14CCB-9BBEACED-48D74B4A5FC27398CDB94E45_sam|text=|trigger=button}{sub-section}{sub-section:10C60B0CF7F3EEC1-9B5889D8-46A14CCB-9BBEACED-48D74B4A5FC27398CDB94E45_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=FFD9D44A94A2DD8C-E5AF8024-4D6348AB-90B5B253-84CAAD8AD9CB2A7624B4BA5A}{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:FFD9D44A94A2DD8C-E5AF8024-4D6348AB-90B5B253-84CAAD8AD9CB2A7624B4BA5A_des|text=|trigger=button}{sub-section}{sub-section:FFD9D44A94A2DD8C-E5AF8024-4D6348AB-90B5B253-84CAAD8AD9CB2A7624B4BA5A_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:FFD9D44A94A2DD8C-E5AF8024-4D6348AB-90B5B253-84CAAD8AD9CB2A7624B4BA5A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FFD9D44A94A2DD8C-E5AF8024-4D6348AB-90B5B253-84CAAD8AD9CB2A7624B4BA5A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:FFD9D44A94A2DD8C-E5AF8024-4D6348AB-90B5B253-84CAAD8AD9CB2A7624B4BA5A_ret|text=|trigger=button}{sub-section}{sub-section:FFD9D44A94A2DD8C-E5AF8024-4D6348AB-90B5B253-84CAAD8AD9CB2A7624B4BA5A_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FFD9D44A94A2DD8C-E5AF8024-4D6348AB-90B5B253-84CAAD8AD9CB2A7624B4BA5A_see|text=|trigger=button}{sub-section}{sub-section:FFD9D44A94A2DD8C-E5AF8024-4D6348AB-90B5B253-84CAAD8AD9CB2A7624B4BA5A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FFD9D44A94A2DD8C-E5AF8024-4D6348AB-90B5B253-84CAAD8AD9CB2A7624B4BA5A_see|text=|trigger=button}{sub-section}{sub-section:FFD9D44A94A2DD8C-E5AF8024-4D6348AB-90B5B253-84CAAD8AD9CB2A7624B4BA5A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FFD9D44A94A2DD8C-E5AF8024-4D6348AB-90B5B253-84CAAD8AD9CB2A7624B4BA5A_sam|text=|trigger=button}{sub-section}{sub-section:FFD9D44A94A2DD8C-E5AF8024-4D6348AB-90B5B253-84CAAD8AD9CB2A7624B4BA5A_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=3E406478524F4771-E375C89F-41A44D32-8D1EBC0A-A008336F5CCFC6561D2018C0}{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:3E406478524F4771-E375C89F-41A44D32-8D1EBC0A-A008336F5CCFC6561D2018C0_des|text=|trigger=button}{sub-section}{sub-section:3E406478524F4771-E375C89F-41A44D32-8D1EBC0A-A008336F5CCFC6561D2018C0_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:3E406478524F4771-E375C89F-41A44D32-8D1EBC0A-A008336F5CCFC6561D2018C0_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3E406478524F4771-E375C89F-41A44D32-8D1EBC0A-A008336F5CCFC6561D2018C0_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:3E406478524F4771-E375C89F-41A44D32-8D1EBC0A-A008336F5CCFC6561D2018C0_ret|text=|trigger=button}{sub-section}{sub-section:3E406478524F4771-E375C89F-41A44D32-8D1EBC0A-A008336F5CCFC6561D2018C0_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:3E406478524F4771-E375C89F-41A44D32-8D1EBC0A-A008336F5CCFC6561D2018C0_see|text=|trigger=button}{sub-section}{sub-section:3E406478524F4771-E375C89F-41A44D32-8D1EBC0A-A008336F5CCFC6561D2018C0_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3E406478524F4771-E375C89F-41A44D32-8D1EBC0A-A008336F5CCFC6561D2018C0_see|text=|trigger=button}{sub-section}{sub-section:3E406478524F4771-E375C89F-41A44D32-8D1EBC0A-A008336F5CCFC6561D2018C0_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3E406478524F4771-E375C89F-41A44D32-8D1EBC0A-A008336F5CCFC6561D2018C0_sam|text=|trigger=button}{sub-section}{sub-section:3E406478524F4771-E375C89F-41A44D32-8D1EBC0A-A008336F5CCFC6561D2018C0_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=8755B7585F12C0FC-6C11BFAC-40EB4A37-B3AEB01D-A1F9B331DC41AB6B86108A87}{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:8755B7585F12C0FC-6C11BFAC-40EB4A37-B3AEB01D-A1F9B331DC41AB6B86108A87_des|text=|trigger=button}{sub-section}{sub-section:8755B7585F12C0FC-6C11BFAC-40EB4A37-B3AEB01D-A1F9B331DC41AB6B86108A87_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:8755B7585F12C0FC-6C11BFAC-40EB4A37-B3AEB01D-A1F9B331DC41AB6B86108A87_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8755B7585F12C0FC-6C11BFAC-40EB4A37-B3AEB01D-A1F9B331DC41AB6B86108A87_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:8755B7585F12C0FC-6C11BFAC-40EB4A37-B3AEB01D-A1F9B331DC41AB6B86108A87_ret|text=|trigger=button}{sub-section}{sub-section:8755B7585F12C0FC-6C11BFAC-40EB4A37-B3AEB01D-A1F9B331DC41AB6B86108A87_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8755B7585F12C0FC-6C11BFAC-40EB4A37-B3AEB01D-A1F9B331DC41AB6B86108A87_see|text=|trigger=button}{sub-section}{sub-section:8755B7585F12C0FC-6C11BFAC-40EB4A37-B3AEB01D-A1F9B331DC41AB6B86108A87_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8755B7585F12C0FC-6C11BFAC-40EB4A37-B3AEB01D-A1F9B331DC41AB6B86108A87_see|text=|trigger=button}{sub-section}{sub-section:8755B7585F12C0FC-6C11BFAC-40EB4A37-B3AEB01D-A1F9B331DC41AB6B86108A87_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8755B7585F12C0FC-6C11BFAC-40EB4A37-B3AEB01D-A1F9B331DC41AB6B86108A87_sam|text=|trigger=button}{sub-section}{sub-section:8755B7585F12C0FC-6C11BFAC-40EB4A37-B3AEB01D-A1F9B331DC41AB6B86108A87_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=11F0FCAF5D167E2C-65929073-442C4086-A1B78525-DBB99502523F0491E7E9C45D}{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:11F0FCAF5D167E2C-65929073-442C4086-A1B78525-DBB99502523F0491E7E9C45D_des|text=|trigger=button}{sub-section}{sub-section:11F0FCAF5D167E2C-65929073-442C4086-A1B78525-DBB99502523F0491E7E9C45D_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:11F0FCAF5D167E2C-65929073-442C4086-A1B78525-DBB99502523F0491E7E9C45D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:11F0FCAF5D167E2C-65929073-442C4086-A1B78525-DBB99502523F0491E7E9C45D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:11F0FCAF5D167E2C-65929073-442C4086-A1B78525-DBB99502523F0491E7E9C45D_ret|text=|trigger=button}{sub-section}{sub-section:11F0FCAF5D167E2C-65929073-442C4086-A1B78525-DBB99502523F0491E7E9C45D_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:11F0FCAF5D167E2C-65929073-442C4086-A1B78525-DBB99502523F0491E7E9C45D_see|text=|trigger=button}{sub-section}{sub-section:11F0FCAF5D167E2C-65929073-442C4086-A1B78525-DBB99502523F0491E7E9C45D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:11F0FCAF5D167E2C-65929073-442C4086-A1B78525-DBB99502523F0491E7E9C45D_see|text=|trigger=button}{sub-section}{sub-section:11F0FCAF5D167E2C-65929073-442C4086-A1B78525-DBB99502523F0491E7E9C45D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:11F0FCAF5D167E2C-65929073-442C4086-A1B78525-DBB99502523F0491E7E9C45D_sam|text=|trigger=button}{sub-section}{sub-section:11F0FCAF5D167E2C-65929073-442C4086-A1B78525-DBB99502523F0491E7E9C45D_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=5AA5C9BD6A0F857D-C07F8E10-42A8476A-B0488E05-504C949C2E59D59FD4F98E72}{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:5AA5C9BD6A0F857D-C07F8E10-42A8476A-B0488E05-504C949C2E59D59FD4F98E72_des|text=|trigger=button}{sub-section}{sub-section:5AA5C9BD6A0F857D-C07F8E10-42A8476A-B0488E05-504C949C2E59D59FD4F98E72_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:5AA5C9BD6A0F857D-C07F8E10-42A8476A-B0488E05-504C949C2E59D59FD4F98E72_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5AA5C9BD6A0F857D-C07F8E10-42A8476A-B0488E05-504C949C2E59D59FD4F98E72_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:5AA5C9BD6A0F857D-C07F8E10-42A8476A-B0488E05-504C949C2E59D59FD4F98E72_ret|text=|trigger=button}{sub-section}{sub-section:5AA5C9BD6A0F857D-C07F8E10-42A8476A-B0488E05-504C949C2E59D59FD4F98E72_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5AA5C9BD6A0F857D-C07F8E10-42A8476A-B0488E05-504C949C2E59D59FD4F98E72_see|text=|trigger=button}{sub-section}{sub-section:5AA5C9BD6A0F857D-C07F8E10-42A8476A-B0488E05-504C949C2E59D59FD4F98E72_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5AA5C9BD6A0F857D-C07F8E10-42A8476A-B0488E05-504C949C2E59D59FD4F98E72_see|text=|trigger=button}{sub-section}{sub-section:5AA5C9BD6A0F857D-C07F8E10-42A8476A-B0488E05-504C949C2E59D59FD4F98E72_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5AA5C9BD6A0F857D-C07F8E10-42A8476A-B0488E05-504C949C2E59D59FD4F98E72_sam|text=|trigger=button}{sub-section}{sub-section:5AA5C9BD6A0F857D-C07F8E10-42A8476A-B0488E05-504C949C2E59D59FD4F98E72_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=B5C87ED8C6F58BD3-7C2B1D78-46D94C8B-AE80A35C-584DF0372040B4EECC1E4943}{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:B5C87ED8C6F58BD3-7C2B1D78-46D94C8B-AE80A35C-584DF0372040B4EECC1E4943_des|text=|trigger=button}{sub-section}{sub-section:B5C87ED8C6F58BD3-7C2B1D78-46D94C8B-AE80A35C-584DF0372040B4EECC1E4943_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:B5C87ED8C6F58BD3-7C2B1D78-46D94C8B-AE80A35C-584DF0372040B4EECC1E4943_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B5C87ED8C6F58BD3-7C2B1D78-46D94C8B-AE80A35C-584DF0372040B4EECC1E4943_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:B5C87ED8C6F58BD3-7C2B1D78-46D94C8B-AE80A35C-584DF0372040B4EECC1E4943_ret|text=|trigger=button}{sub-section}{sub-section:B5C87ED8C6F58BD3-7C2B1D78-46D94C8B-AE80A35C-584DF0372040B4EECC1E4943_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B5C87ED8C6F58BD3-7C2B1D78-46D94C8B-AE80A35C-584DF0372040B4EECC1E4943_see|text=|trigger=button}{sub-section}{sub-section:B5C87ED8C6F58BD3-7C2B1D78-46D94C8B-AE80A35C-584DF0372040B4EECC1E4943_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B5C87ED8C6F58BD3-7C2B1D78-46D94C8B-AE80A35C-584DF0372040B4EECC1E4943_see|text=|trigger=button}{sub-section}{sub-section:B5C87ED8C6F58BD3-7C2B1D78-46D94C8B-AE80A35C-584DF0372040B4EECC1E4943_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B5C87ED8C6F58BD3-7C2B1D78-46D94C8B-AE80A35C-584DF0372040B4EECC1E4943_sam|text=|trigger=button}{sub-section}{sub-section:B5C87ED8C6F58BD3-7C2B1D78-46D94C8B-AE80A35C-584DF0372040B4EECC1E4943_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=36AEEC9BA76F77B4-32898B01-4FC64C66-9C9D80F1-C46A7C2863406537643924B6}{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:36AEEC9BA76F77B4-32898B01-4FC64C66-9C9D80F1-C46A7C2863406537643924B6_des|text=|trigger=button}{sub-section}{sub-section:36AEEC9BA76F77B4-32898B01-4FC64C66-9C9D80F1-C46A7C2863406537643924B6_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:36AEEC9BA76F77B4-32898B01-4FC64C66-9C9D80F1-C46A7C2863406537643924B6_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:36AEEC9BA76F77B4-32898B01-4FC64C66-9C9D80F1-C46A7C2863406537643924B6_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:36AEEC9BA76F77B4-32898B01-4FC64C66-9C9D80F1-C46A7C2863406537643924B6_ret|text=|trigger=button}{sub-section}{sub-section:36AEEC9BA76F77B4-32898B01-4FC64C66-9C9D80F1-C46A7C2863406537643924B6_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:36AEEC9BA76F77B4-32898B01-4FC64C66-9C9D80F1-C46A7C2863406537643924B6_see|text=|trigger=button}{sub-section}{sub-section:36AEEC9BA76F77B4-32898B01-4FC64C66-9C9D80F1-C46A7C2863406537643924B6_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:36AEEC9BA76F77B4-32898B01-4FC64C66-9C9D80F1-C46A7C2863406537643924B6_see|text=|trigger=button}{sub-section}{sub-section:36AEEC9BA76F77B4-32898B01-4FC64C66-9C9D80F1-C46A7C2863406537643924B6_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:36AEEC9BA76F77B4-32898B01-4FC64C66-9C9D80F1-C46A7C2863406537643924B6_sam|text=|trigger=button}{sub-section}{sub-section:36AEEC9BA76F77B4-32898B01-4FC64C66-9C9D80F1-C46A7C2863406537643924B6_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=C11A2825537D9AA5-7FB3204E-4E6E484E-8890AFA6-0138B17109C4FF1CC8A7EBE2}{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:C11A2825537D9AA5-7FB3204E-4E6E484E-8890AFA6-0138B17109C4FF1CC8A7EBE2_des|text=|trigger=button}{sub-section}{sub-section:C11A2825537D9AA5-7FB3204E-4E6E484E-8890AFA6-0138B17109C4FF1CC8A7EBE2_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:C11A2825537D9AA5-7FB3204E-4E6E484E-8890AFA6-0138B17109C4FF1CC8A7EBE2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C11A2825537D9AA5-7FB3204E-4E6E484E-8890AFA6-0138B17109C4FF1CC8A7EBE2_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C11A2825537D9AA5-7FB3204E-4E6E484E-8890AFA6-0138B17109C4FF1CC8A7EBE2_ret|text=|trigger=button}{sub-section}{sub-section:C11A2825537D9AA5-7FB3204E-4E6E484E-8890AFA6-0138B17109C4FF1CC8A7EBE2_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C11A2825537D9AA5-7FB3204E-4E6E484E-8890AFA6-0138B17109C4FF1CC8A7EBE2_see|text=|trigger=button}{sub-section}{sub-section:C11A2825537D9AA5-7FB3204E-4E6E484E-8890AFA6-0138B17109C4FF1CC8A7EBE2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C11A2825537D9AA5-7FB3204E-4E6E484E-8890AFA6-0138B17109C4FF1CC8A7EBE2_see|text=|trigger=button}{sub-section}{sub-section:C11A2825537D9AA5-7FB3204E-4E6E484E-8890AFA6-0138B17109C4FF1CC8A7EBE2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C11A2825537D9AA5-7FB3204E-4E6E484E-8890AFA6-0138B17109C4FF1CC8A7EBE2_sam|text=|trigger=button}{sub-section}{sub-section:C11A2825537D9AA5-7FB3204E-4E6E484E-8890AFA6-0138B17109C4FF1CC8A7EBE2_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=E9A6D46068FA9E52-D8CC0E45-40A94D12-B84997DA-4E1DACE3914EC866A52B3901}{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:E9A6D46068FA9E52-D8CC0E45-40A94D12-B84997DA-4E1DACE3914EC866A52B3901_des|text=|trigger=button}{sub-section}{sub-section:E9A6D46068FA9E52-D8CC0E45-40A94D12-B84997DA-4E1DACE3914EC866A52B3901_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:E9A6D46068FA9E52-D8CC0E45-40A94D12-B84997DA-4E1DACE3914EC866A52B3901_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E9A6D46068FA9E52-D8CC0E45-40A94D12-B84997DA-4E1DACE3914EC866A52B3901_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:E9A6D46068FA9E52-D8CC0E45-40A94D12-B84997DA-4E1DACE3914EC866A52B3901_ret|text=|trigger=button}{sub-section}{sub-section:E9A6D46068FA9E52-D8CC0E45-40A94D12-B84997DA-4E1DACE3914EC866A52B3901_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E9A6D46068FA9E52-D8CC0E45-40A94D12-B84997DA-4E1DACE3914EC866A52B3901_see|text=|trigger=button}{sub-section}{sub-section:E9A6D46068FA9E52-D8CC0E45-40A94D12-B84997DA-4E1DACE3914EC866A52B3901_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E9A6D46068FA9E52-D8CC0E45-40A94D12-B84997DA-4E1DACE3914EC866A52B3901_see|text=|trigger=button}{sub-section}{sub-section:E9A6D46068FA9E52-D8CC0E45-40A94D12-B84997DA-4E1DACE3914EC866A52B3901_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E9A6D46068FA9E52-D8CC0E45-40A94D12-B84997DA-4E1DACE3914EC866A52B3901_sam|text=|trigger=button}{sub-section}{sub-section:E9A6D46068FA9E52-D8CC0E45-40A94D12-B84997DA-4E1DACE3914EC866A52B3901_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=C508CCFB8E723AEB-D64F9A0B-41A847E5-95C6A80A-2350777A8390C658BCE6E23A}{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:C508CCFB8E723AEB-D64F9A0B-41A847E5-95C6A80A-2350777A8390C658BCE6E23A_des|text=|trigger=button}{sub-section}{sub-section:C508CCFB8E723AEB-D64F9A0B-41A847E5-95C6A80A-2350777A8390C658BCE6E23A_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:C508CCFB8E723AEB-D64F9A0B-41A847E5-95C6A80A-2350777A8390C658BCE6E23A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C508CCFB8E723AEB-D64F9A0B-41A847E5-95C6A80A-2350777A8390C658BCE6E23A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C508CCFB8E723AEB-D64F9A0B-41A847E5-95C6A80A-2350777A8390C658BCE6E23A_ret|text=|trigger=button}{sub-section}{sub-section:C508CCFB8E723AEB-D64F9A0B-41A847E5-95C6A80A-2350777A8390C658BCE6E23A_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C508CCFB8E723AEB-D64F9A0B-41A847E5-95C6A80A-2350777A8390C658BCE6E23A_see|text=|trigger=button}{sub-section}{sub-section:C508CCFB8E723AEB-D64F9A0B-41A847E5-95C6A80A-2350777A8390C658BCE6E23A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C508CCFB8E723AEB-D64F9A0B-41A847E5-95C6A80A-2350777A8390C658BCE6E23A_see|text=|trigger=button}{sub-section}{sub-section:C508CCFB8E723AEB-D64F9A0B-41A847E5-95C6A80A-2350777A8390C658BCE6E23A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C508CCFB8E723AEB-D64F9A0B-41A847E5-95C6A80A-2350777A8390C658BCE6E23A_sam|text=|trigger=button}{sub-section}{sub-section:C508CCFB8E723AEB-D64F9A0B-41A847E5-95C6A80A-2350777A8390C658BCE6E23A_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=C3D412198D30E845-3E12F6F6-4CE5416D-94E48225-F9117CFB3BD768B467DB6E0E}{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:C3D412198D30E845-3E12F6F6-4CE5416D-94E48225-F9117CFB3BD768B467DB6E0E_des|text=|trigger=button}{sub-section}{sub-section:C3D412198D30E845-3E12F6F6-4CE5416D-94E48225-F9117CFB3BD768B467DB6E0E_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:C3D412198D30E845-3E12F6F6-4CE5416D-94E48225-F9117CFB3BD768B467DB6E0E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C3D412198D30E845-3E12F6F6-4CE5416D-94E48225-F9117CFB3BD768B467DB6E0E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C3D412198D30E845-3E12F6F6-4CE5416D-94E48225-F9117CFB3BD768B467DB6E0E_ret|text=|trigger=button}{sub-section}{sub-section:C3D412198D30E845-3E12F6F6-4CE5416D-94E48225-F9117CFB3BD768B467DB6E0E_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C3D412198D30E845-3E12F6F6-4CE5416D-94E48225-F9117CFB3BD768B467DB6E0E_see|text=|trigger=button}{sub-section}{sub-section:C3D412198D30E845-3E12F6F6-4CE5416D-94E48225-F9117CFB3BD768B467DB6E0E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C3D412198D30E845-3E12F6F6-4CE5416D-94E48225-F9117CFB3BD768B467DB6E0E_see|text=|trigger=button}{sub-section}{sub-section:C3D412198D30E845-3E12F6F6-4CE5416D-94E48225-F9117CFB3BD768B467DB6E0E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C3D412198D30E845-3E12F6F6-4CE5416D-94E48225-F9117CFB3BD768B467DB6E0E_sam|text=|trigger=button}{sub-section}{sub-section:C3D412198D30E845-3E12F6F6-4CE5416D-94E48225-F9117CFB3BD768B467DB6E0E_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=FC1389319A09CB1A-DAE792BD-4953434E-A67EA894-82F546803AC830C630FD7AC8}{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:FC1389319A09CB1A-DAE792BD-4953434E-A67EA894-82F546803AC830C630FD7AC8_des|text=|trigger=button}{sub-section}{sub-section:FC1389319A09CB1A-DAE792BD-4953434E-A67EA894-82F546803AC830C630FD7AC8_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:FC1389319A09CB1A-DAE792BD-4953434E-A67EA894-82F546803AC830C630FD7AC8_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FC1389319A09CB1A-DAE792BD-4953434E-A67EA894-82F546803AC830C630FD7AC8_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:FC1389319A09CB1A-DAE792BD-4953434E-A67EA894-82F546803AC830C630FD7AC8_ret|text=|trigger=button}{sub-section}{sub-section:FC1389319A09CB1A-DAE792BD-4953434E-A67EA894-82F546803AC830C630FD7AC8_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FC1389319A09CB1A-DAE792BD-4953434E-A67EA894-82F546803AC830C630FD7AC8_see|text=|trigger=button}{sub-section}{sub-section:FC1389319A09CB1A-DAE792BD-4953434E-A67EA894-82F546803AC830C630FD7AC8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FC1389319A09CB1A-DAE792BD-4953434E-A67EA894-82F546803AC830C630FD7AC8_see|text=|trigger=button}{sub-section}{sub-section:FC1389319A09CB1A-DAE792BD-4953434E-A67EA894-82F546803AC830C630FD7AC8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FC1389319A09CB1A-DAE792BD-4953434E-A67EA894-82F546803AC830C630FD7AC8_sam|text=|trigger=button}{sub-section}{sub-section:FC1389319A09CB1A-DAE792BD-4953434E-A67EA894-82F546803AC830C630FD7AC8_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=E0FD05F7E2540E9D-5F2984DD-4A9D4DC5-AFBFA10E-D2220E35CAD9FB0AA23DCE69}{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:E0FD05F7E2540E9D-5F2984DD-4A9D4DC5-AFBFA10E-D2220E35CAD9FB0AA23DCE69_des|text=|trigger=button}{sub-section}{sub-section:E0FD05F7E2540E9D-5F2984DD-4A9D4DC5-AFBFA10E-D2220E35CAD9FB0AA23DCE69_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:E0FD05F7E2540E9D-5F2984DD-4A9D4DC5-AFBFA10E-D2220E35CAD9FB0AA23DCE69_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E0FD05F7E2540E9D-5F2984DD-4A9D4DC5-AFBFA10E-D2220E35CAD9FB0AA23DCE69_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:E0FD05F7E2540E9D-5F2984DD-4A9D4DC5-AFBFA10E-D2220E35CAD9FB0AA23DCE69_ret|text=|trigger=button}{sub-section}{sub-section:E0FD05F7E2540E9D-5F2984DD-4A9D4DC5-AFBFA10E-D2220E35CAD9FB0AA23DCE69_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E0FD05F7E2540E9D-5F2984DD-4A9D4DC5-AFBFA10E-D2220E35CAD9FB0AA23DCE69_see|text=|trigger=button}{sub-section}{sub-section:E0FD05F7E2540E9D-5F2984DD-4A9D4DC5-AFBFA10E-D2220E35CAD9FB0AA23DCE69_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E0FD05F7E2540E9D-5F2984DD-4A9D4DC5-AFBFA10E-D2220E35CAD9FB0AA23DCE69_see|text=|trigger=button}{sub-section}{sub-section:E0FD05F7E2540E9D-5F2984DD-4A9D4DC5-AFBFA10E-D2220E35CAD9FB0AA23DCE69_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E0FD05F7E2540E9D-5F2984DD-4A9D4DC5-AFBFA10E-D2220E35CAD9FB0AA23DCE69_sam|text=|trigger=button}{sub-section}{sub-section:E0FD05F7E2540E9D-5F2984DD-4A9D4DC5-AFBFA10E-D2220E35CAD9FB0AA23DCE69_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=BF811D649174F5DB-9B748B12-455A4EC2-A0A2B5C3-B30516840B62947BBF4B2E8F}{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:BF811D649174F5DB-9B748B12-455A4EC2-A0A2B5C3-B30516840B62947BBF4B2E8F_des|text=|trigger=button}{sub-section}{sub-section:BF811D649174F5DB-9B748B12-455A4EC2-A0A2B5C3-B30516840B62947BBF4B2E8F_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:BF811D649174F5DB-9B748B12-455A4EC2-A0A2B5C3-B30516840B62947BBF4B2E8F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BF811D649174F5DB-9B748B12-455A4EC2-A0A2B5C3-B30516840B62947BBF4B2E8F_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:BF811D649174F5DB-9B748B12-455A4EC2-A0A2B5C3-B30516840B62947BBF4B2E8F_ret|text=|trigger=button}{sub-section}{sub-section:BF811D649174F5DB-9B748B12-455A4EC2-A0A2B5C3-B30516840B62947BBF4B2E8F_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BF811D649174F5DB-9B748B12-455A4EC2-A0A2B5C3-B30516840B62947BBF4B2E8F_see|text=|trigger=button}{sub-section}{sub-section:BF811D649174F5DB-9B748B12-455A4EC2-A0A2B5C3-B30516840B62947BBF4B2E8F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BF811D649174F5DB-9B748B12-455A4EC2-A0A2B5C3-B30516840B62947BBF4B2E8F_see|text=|trigger=button}{sub-section}{sub-section:BF811D649174F5DB-9B748B12-455A4EC2-A0A2B5C3-B30516840B62947BBF4B2E8F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BF811D649174F5DB-9B748B12-455A4EC2-A0A2B5C3-B30516840B62947BBF4B2E8F_sam|text=|trigger=button}{sub-section}{sub-section:BF811D649174F5DB-9B748B12-455A4EC2-A0A2B5C3-B30516840B62947BBF4B2E8F_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=F3560ECD39DAAD27-82AEC100-40104338-8F109C89-75A48247A01E143F400C6F6B}{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:F3560ECD39DAAD27-82AEC100-40104338-8F109C89-75A48247A01E143F400C6F6B_des|text=|trigger=button}{sub-section}{sub-section:F3560ECD39DAAD27-82AEC100-40104338-8F109C89-75A48247A01E143F400C6F6B_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:F3560ECD39DAAD27-82AEC100-40104338-8F109C89-75A48247A01E143F400C6F6B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F3560ECD39DAAD27-82AEC100-40104338-8F109C89-75A48247A01E143F400C6F6B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F3560ECD39DAAD27-82AEC100-40104338-8F109C89-75A48247A01E143F400C6F6B_ret|text=|trigger=button}{sub-section}{sub-section:F3560ECD39DAAD27-82AEC100-40104338-8F109C89-75A48247A01E143F400C6F6B_ret|trigger=none|class=sIndent}[Date]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F3560ECD39DAAD27-82AEC100-40104338-8F109C89-75A48247A01E143F400C6F6B_see|text=|trigger=button}{sub-section}{sub-section:F3560ECD39DAAD27-82AEC100-40104338-8F109C89-75A48247A01E143F400C6F6B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F3560ECD39DAAD27-82AEC100-40104338-8F109C89-75A48247A01E143F400C6F6B_see|text=|trigger=button}{sub-section}{sub-section:F3560ECD39DAAD27-82AEC100-40104338-8F109C89-75A48247A01E143F400C6F6B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F3560ECD39DAAD27-82AEC100-40104338-8F109C89-75A48247A01E143F400C6F6B_sam|text=|trigger=button}{sub-section}{sub-section:F3560ECD39DAAD27-82AEC100-40104338-8F109C89-75A48247A01E143F400C6F6B_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=23885A8FB3BF8487-D0BA605B-466F4EC4-AA48B19F-FA09957053F501E238BBC53C}{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:23885A8FB3BF8487-D0BA605B-466F4EC4-AA48B19F-FA09957053F501E238BBC53C_des|text=|trigger=button}{sub-section}{sub-section:23885A8FB3BF8487-D0BA605B-466F4EC4-AA48B19F-FA09957053F501E238BBC53C_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:23885A8FB3BF8487-D0BA605B-466F4EC4-AA48B19F-FA09957053F501E238BBC53C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:23885A8FB3BF8487-D0BA605B-466F4EC4-AA48B19F-FA09957053F501E238BBC53C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:23885A8FB3BF8487-D0BA605B-466F4EC4-AA48B19F-FA09957053F501E238BBC53C_ret|text=|trigger=button}{sub-section}{sub-section:23885A8FB3BF8487-D0BA605B-466F4EC4-AA48B19F-FA09957053F501E238BBC53C_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:23885A8FB3BF8487-D0BA605B-466F4EC4-AA48B19F-FA09957053F501E238BBC53C_see|text=|trigger=button}{sub-section}{sub-section:23885A8FB3BF8487-D0BA605B-466F4EC4-AA48B19F-FA09957053F501E238BBC53C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:23885A8FB3BF8487-D0BA605B-466F4EC4-AA48B19F-FA09957053F501E238BBC53C_see|text=|trigger=button}{sub-section}{sub-section:23885A8FB3BF8487-D0BA605B-466F4EC4-AA48B19F-FA09957053F501E238BBC53C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:23885A8FB3BF8487-D0BA605B-466F4EC4-AA48B19F-FA09957053F501E238BBC53C_sam|text=|trigger=button}{sub-section}{sub-section:23885A8FB3BF8487-D0BA605B-466F4EC4-AA48B19F-FA09957053F501E238BBC53C_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=A378CF83089A0F5B-20D68B34-45214B2B-8809A3A0-65135172BAB4F3F42E0B4646}{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:A378CF83089A0F5B-20D68B34-45214B2B-8809A3A0-65135172BAB4F3F42E0B4646_des|text=|trigger=button}{sub-section}{sub-section:A378CF83089A0F5B-20D68B34-45214B2B-8809A3A0-65135172BAB4F3F42E0B4646_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:A378CF83089A0F5B-20D68B34-45214B2B-8809A3A0-65135172BAB4F3F42E0B4646_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A378CF83089A0F5B-20D68B34-45214B2B-8809A3A0-65135172BAB4F3F42E0B4646_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A378CF83089A0F5B-20D68B34-45214B2B-8809A3A0-65135172BAB4F3F42E0B4646_ret|text=|trigger=button}{sub-section}{sub-section:A378CF83089A0F5B-20D68B34-45214B2B-8809A3A0-65135172BAB4F3F42E0B4646_ret|trigger=none|class=sIndent}[JSFile]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A378CF83089A0F5B-20D68B34-45214B2B-8809A3A0-65135172BAB4F3F42E0B4646_see|text=|trigger=button}{sub-section}{sub-section:A378CF83089A0F5B-20D68B34-45214B2B-8809A3A0-65135172BAB4F3F42E0B4646_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A378CF83089A0F5B-20D68B34-45214B2B-8809A3A0-65135172BAB4F3F42E0B4646_see|text=|trigger=button}{sub-section}{sub-section:A378CF83089A0F5B-20D68B34-45214B2B-8809A3A0-65135172BAB4F3F42E0B4646_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A378CF83089A0F5B-20D68B34-45214B2B-8809A3A0-65135172BAB4F3F42E0B4646_sam|text=|trigger=button}{sub-section}{sub-section:A378CF83089A0F5B-20D68B34-45214B2B-8809A3A0-65135172BAB4F3F42E0B4646_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=C3601D218C9EAACE-9ACF5311-449743C2-BBA6AF46-AEC8E9015A680B5F0BA15613}{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:C3601D218C9EAACE-9ACF5311-449743C2-BBA6AF46-AEC8E9015A680B5F0BA15613_des|text=|trigger=button}{sub-section}{sub-section:C3601D218C9EAACE-9ACF5311-449743C2-BBA6AF46-AEC8E9015A680B5F0BA15613_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:C3601D218C9EAACE-9ACF5311-449743C2-BBA6AF46-AEC8E9015A680B5F0BA15613_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C3601D218C9EAACE-9ACF5311-449743C2-BBA6AF46-AEC8E9015A680B5F0BA15613_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C3601D218C9EAACE-9ACF5311-449743C2-BBA6AF46-AEC8E9015A680B5F0BA15613_ret|text=|trigger=button}{sub-section}{sub-section:C3601D218C9EAACE-9ACF5311-449743C2-BBA6AF46-AEC8E9015A680B5F0BA15613_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C3601D218C9EAACE-9ACF5311-449743C2-BBA6AF46-AEC8E9015A680B5F0BA15613_see|text=|trigger=button}{sub-section}{sub-section:C3601D218C9EAACE-9ACF5311-449743C2-BBA6AF46-AEC8E9015A680B5F0BA15613_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C3601D218C9EAACE-9ACF5311-449743C2-BBA6AF46-AEC8E9015A680B5F0BA15613_see|text=|trigger=button}{sub-section}{sub-section:C3601D218C9EAACE-9ACF5311-449743C2-BBA6AF46-AEC8E9015A680B5F0BA15613_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C3601D218C9EAACE-9ACF5311-449743C2-BBA6AF46-AEC8E9015A680B5F0BA15613_sam|text=|trigger=button}{sub-section}{sub-section:C3601D218C9EAACE-9ACF5311-449743C2-BBA6AF46-AEC8E9015A680B5F0BA15613_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=4AF8EFD212BE700B-F9251F9A-47C44C6F-BF72BB3C-192F7AD6174DD2ABDF5A23F7}{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:4AF8EFD212BE700B-F9251F9A-47C44C6F-BF72BB3C-192F7AD6174DD2ABDF5A23F7_des|text=|trigger=button}{sub-section}{sub-section:4AF8EFD212BE700B-F9251F9A-47C44C6F-BF72BB3C-192F7AD6174DD2ABDF5A23F7_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:4AF8EFD212BE700B-F9251F9A-47C44C6F-BF72BB3C-192F7AD6174DD2ABDF5A23F7_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4AF8EFD212BE700B-F9251F9A-47C44C6F-BF72BB3C-192F7AD6174DD2ABDF5A23F7_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:4AF8EFD212BE700B-F9251F9A-47C44C6F-BF72BB3C-192F7AD6174DD2ABDF5A23F7_ret|text=|trigger=button}{sub-section}{sub-section:4AF8EFD212BE700B-F9251F9A-47C44C6F-BF72BB3C-192F7AD6174DD2ABDF5A23F7_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4AF8EFD212BE700B-F9251F9A-47C44C6F-BF72BB3C-192F7AD6174DD2ABDF5A23F7_see|text=|trigger=button}{sub-section}{sub-section:4AF8EFD212BE700B-F9251F9A-47C44C6F-BF72BB3C-192F7AD6174DD2ABDF5A23F7_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4AF8EFD212BE700B-F9251F9A-47C44C6F-BF72BB3C-192F7AD6174DD2ABDF5A23F7_see|text=|trigger=button}{sub-section}{sub-section:4AF8EFD212BE700B-F9251F9A-47C44C6F-BF72BB3C-192F7AD6174DD2ABDF5A23F7_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4AF8EFD212BE700B-F9251F9A-47C44C6F-BF72BB3C-192F7AD6174DD2ABDF5A23F7_sam|text=|trigger=button}{sub-section}{sub-section:4AF8EFD212BE700B-F9251F9A-47C44C6F-BF72BB3C-192F7AD6174DD2ABDF5A23F7_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=4079E58BD1C06E64-E426BCAC-41A34C96-83568960-72F5C4CC908ECB8605EE902C}{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:4079E58BD1C06E64-E426BCAC-41A34C96-83568960-72F5C4CC908ECB8605EE902C_des|text=|trigger=button}{sub-section}{sub-section:4079E58BD1C06E64-E426BCAC-41A34C96-83568960-72F5C4CC908ECB8605EE902C_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:4079E58BD1C06E64-E426BCAC-41A34C96-83568960-72F5C4CC908ECB8605EE902C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4079E58BD1C06E64-E426BCAC-41A34C96-83568960-72F5C4CC908ECB8605EE902C_prs|trigger=none}destination
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:4079E58BD1C06E64-E426BCAC-41A34C96-83568960-72F5C4CC908ECB8605EE902C_ret|text=|trigger=button}{sub-section}{sub-section:4079E58BD1C06E64-E426BCAC-41A34C96-83568960-72F5C4CC908ECB8605EE902C_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4079E58BD1C06E64-E426BCAC-41A34C96-83568960-72F5C4CC908ECB8605EE902C_see|text=|trigger=button}{sub-section}{sub-section:4079E58BD1C06E64-E426BCAC-41A34C96-83568960-72F5C4CC908ECB8605EE902C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4079E58BD1C06E64-E426BCAC-41A34C96-83568960-72F5C4CC908ECB8605EE902C_see|text=|trigger=button}{sub-section}{sub-section:4079E58BD1C06E64-E426BCAC-41A34C96-83568960-72F5C4CC908ECB8605EE902C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4079E58BD1C06E64-E426BCAC-41A34C96-83568960-72F5C4CC908ECB8605EE902C_sam|text=|trigger=button}{sub-section}{sub-section:4079E58BD1C06E64-E426BCAC-41A34C96-83568960-72F5C4CC908ECB8605EE902C_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=CB52B8B78F75FDE7-41C230C6-4555496C-BBD89FA0-DB9B70731849AC740388AE82}{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:CB52B8B78F75FDE7-41C230C6-4555496C-BBD89FA0-DB9B70731849AC740388AE82_des|text=|trigger=button}{sub-section}{sub-section:CB52B8B78F75FDE7-41C230C6-4555496C-BBD89FA0-DB9B70731849AC740388AE82_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:CB52B8B78F75FDE7-41C230C6-4555496C-BBD89FA0-DB9B70731849AC740388AE82_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CB52B8B78F75FDE7-41C230C6-4555496C-BBD89FA0-DB9B70731849AC740388AE82_prs|trigger=none}date
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:CB52B8B78F75FDE7-41C230C6-4555496C-BBD89FA0-DB9B70731849AC740388AE82_ret|text=|trigger=button}{sub-section}{sub-section:CB52B8B78F75FDE7-41C230C6-4555496C-BBD89FA0-DB9B70731849AC740388AE82_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:CB52B8B78F75FDE7-41C230C6-4555496C-BBD89FA0-DB9B70731849AC740388AE82_see|text=|trigger=button}{sub-section}{sub-section:CB52B8B78F75FDE7-41C230C6-4555496C-BBD89FA0-DB9B70731849AC740388AE82_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:CB52B8B78F75FDE7-41C230C6-4555496C-BBD89FA0-DB9B70731849AC740388AE82_see|text=|trigger=button}{sub-section}{sub-section:CB52B8B78F75FDE7-41C230C6-4555496C-BBD89FA0-DB9B70731849AC740388AE82_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:CB52B8B78F75FDE7-41C230C6-4555496C-BBD89FA0-DB9B70731849AC740388AE82_sam|text=|trigger=button}{sub-section}{sub-section:CB52B8B78F75FDE7-41C230C6-4555496C-BBD89FA0-DB9B70731849AC740388AE82_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=35B82E08D1AE9FB6-2EDA329F-4C4046EB-9761BA38-E21AE665560027AAD0E891D8}{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:35B82E08D1AE9FB6-2EDA329F-4C4046EB-9761BA38-E21AE665560027AAD0E891D8_des|text=|trigger=button}{sub-section}{sub-section:35B82E08D1AE9FB6-2EDA329F-4C4046EB-9761BA38-E21AE665560027AAD0E891D8_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:35B82E08D1AE9FB6-2EDA329F-4C4046EB-9761BA38-E21AE665560027AAD0E891D8_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:35B82E08D1AE9FB6-2EDA329F-4C4046EB-9761BA38-E21AE665560027AAD0E891D8_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:35B82E08D1AE9FB6-2EDA329F-4C4046EB-9761BA38-E21AE665560027AAD0E891D8_ret|text=|trigger=button}{sub-section}{sub-section:35B82E08D1AE9FB6-2EDA329F-4C4046EB-9761BA38-E21AE665560027AAD0E891D8_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:35B82E08D1AE9FB6-2EDA329F-4C4046EB-9761BA38-E21AE665560027AAD0E891D8_see|text=|trigger=button}{sub-section}{sub-section:35B82E08D1AE9FB6-2EDA329F-4C4046EB-9761BA38-E21AE665560027AAD0E891D8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:35B82E08D1AE9FB6-2EDA329F-4C4046EB-9761BA38-E21AE665560027AAD0E891D8_see|text=|trigger=button}{sub-section}{sub-section:35B82E08D1AE9FB6-2EDA329F-4C4046EB-9761BA38-E21AE665560027AAD0E891D8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:35B82E08D1AE9FB6-2EDA329F-4C4046EB-9761BA38-E21AE665560027AAD0E891D8_sam|text=|trigger=button}{sub-section}{sub-section:35B82E08D1AE9FB6-2EDA329F-4C4046EB-9761BA38-E21AE665560027AAD0E891D8_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=84859CA991744863-D55749CF-47A14476-B476809C-B56CBEFD68A3724B14C1E8E8}{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:84859CA991744863-D55749CF-47A14476-B476809C-B56CBEFD68A3724B14C1E8E8_des|text=|trigger=button}{sub-section}{sub-section:84859CA991744863-D55749CF-47A14476-B476809C-B56CBEFD68A3724B14C1E8E8_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:84859CA991744863-D55749CF-47A14476-B476809C-B56CBEFD68A3724B14C1E8E8_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:84859CA991744863-D55749CF-47A14476-B476809C-B56CBEFD68A3724B14C1E8E8_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:84859CA991744863-D55749CF-47A14476-B476809C-B56CBEFD68A3724B14C1E8E8_ret|text=|trigger=button}{sub-section}{sub-section:84859CA991744863-D55749CF-47A14476-B476809C-B56CBEFD68A3724B14C1E8E8_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:84859CA991744863-D55749CF-47A14476-B476809C-B56CBEFD68A3724B14C1E8E8_see|text=|trigger=button}{sub-section}{sub-section:84859CA991744863-D55749CF-47A14476-B476809C-B56CBEFD68A3724B14C1E8E8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:84859CA991744863-D55749CF-47A14476-B476809C-B56CBEFD68A3724B14C1E8E8_see|text=|trigger=button}{sub-section}{sub-section:84859CA991744863-D55749CF-47A14476-B476809C-B56CBEFD68A3724B14C1E8E8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:84859CA991744863-D55749CF-47A14476-B476809C-B56CBEFD68A3724B14C1E8E8_sam|text=|trigger=button}{sub-section}{sub-section:84859CA991744863-D55749CF-47A14476-B476809C-B56CBEFD68A3724B14C1E8E8_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}