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=6F7A24AD2AD4B28D-9C9F870A-45B64522-B496802C-6F7D7B84779E9906E40C60CB}{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:6F7A24AD2AD4B28D-9C9F870A-45B64522-B496802C-6F7D7B84779E9906E40C60CB_des|text=|trigger=button}{sub-section}{sub-section:6F7A24AD2AD4B28D-9C9F870A-45B64522-B496802C-6F7D7B84779E9906E40C60CB_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:6F7A24AD2AD4B28D-9C9F870A-45B64522-B496802C-6F7D7B84779E9906E40C60CB_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:6F7A24AD2AD4B28D-9C9F870A-45B64522-B496802C-6F7D7B84779E9906E40C60CB_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:6F7A24AD2AD4B28D-9C9F870A-45B64522-B496802C-6F7D7B84779E9906E40C60CB_ret|text=|trigger=button}{sub-section}{sub-section:6F7A24AD2AD4B28D-9C9F870A-45B64522-B496802C-6F7D7B84779E9906E40C60CB_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:6F7A24AD2AD4B28D-9C9F870A-45B64522-B496802C-6F7D7B84779E9906E40C60CB_see|text=|trigger=button}{sub-section}{sub-section:6F7A24AD2AD4B28D-9C9F870A-45B64522-B496802C-6F7D7B84779E9906E40C60CB_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:6F7A24AD2AD4B28D-9C9F870A-45B64522-B496802C-6F7D7B84779E9906E40C60CB_see|text=|trigger=button}{sub-section}{sub-section:6F7A24AD2AD4B28D-9C9F870A-45B64522-B496802C-6F7D7B84779E9906E40C60CB_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:6F7A24AD2AD4B28D-9C9F870A-45B64522-B496802C-6F7D7B84779E9906E40C60CB_sam|text=|trigger=button}{sub-section}{sub-section:6F7A24AD2AD4B28D-9C9F870A-45B64522-B496802C-6F7D7B84779E9906E40C60CB_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=E705B7B710C60B0C-E8D39B58-4ACE46A1-A0959BBE-A99AAE4BC71F48D74B4A5FC2}{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:E705B7B710C60B0C-E8D39B58-4ACE46A1-A0959BBE-A99AAE4BC71F48D74B4A5FC2_des|text=|trigger=button}{sub-section}{sub-section:E705B7B710C60B0C-E8D39B58-4ACE46A1-A0959BBE-A99AAE4BC71F48D74B4A5FC2_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:E705B7B710C60B0C-E8D39B58-4ACE46A1-A0959BBE-A99AAE4BC71F48D74B4A5FC2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E705B7B710C60B0C-E8D39B58-4ACE46A1-A0959BBE-A99AAE4BC71F48D74B4A5FC2_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:E705B7B710C60B0C-E8D39B58-4ACE46A1-A0959BBE-A99AAE4BC71F48D74B4A5FC2_ret|text=|trigger=button}{sub-section}{sub-section:E705B7B710C60B0C-E8D39B58-4ACE46A1-A0959BBE-A99AAE4BC71F48D74B4A5FC2_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E705B7B710C60B0C-E8D39B58-4ACE46A1-A0959BBE-A99AAE4BC71F48D74B4A5FC2_see|text=|trigger=button}{sub-section}{sub-section:E705B7B710C60B0C-E8D39B58-4ACE46A1-A0959BBE-A99AAE4BC71F48D74B4A5FC2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E705B7B710C60B0C-E8D39B58-4ACE46A1-A0959BBE-A99AAE4BC71F48D74B4A5FC2_see|text=|trigger=button}{sub-section}{sub-section:E705B7B710C60B0C-E8D39B58-4ACE46A1-A0959BBE-A99AAE4BC71F48D74B4A5FC2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E705B7B710C60B0C-E8D39B58-4ACE46A1-A0959BBE-A99AAE4BC71F48D74B4A5FC2_sam|text=|trigger=button}{sub-section}{sub-section:E705B7B710C60B0C-E8D39B58-4ACE46A1-A0959BBE-A99AAE4BC71F48D74B4A5FC2_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=E4A33047FFD9D44A-CC9DE5AF-4F934D63-AA7790B5-710168AA665F84CAAD8AD9CB}{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:E4A33047FFD9D44A-CC9DE5AF-4F934D63-AA7790B5-710168AA665F84CAAD8AD9CB_des|text=|trigger=button}{sub-section}{sub-section:E4A33047FFD9D44A-CC9DE5AF-4F934D63-AA7790B5-710168AA665F84CAAD8AD9CB_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:E4A33047FFD9D44A-CC9DE5AF-4F934D63-AA7790B5-710168AA665F84CAAD8AD9CB_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E4A33047FFD9D44A-CC9DE5AF-4F934D63-AA7790B5-710168AA665F84CAAD8AD9CB_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:E4A33047FFD9D44A-CC9DE5AF-4F934D63-AA7790B5-710168AA665F84CAAD8AD9CB_ret|text=|trigger=button}{sub-section}{sub-section:E4A33047FFD9D44A-CC9DE5AF-4F934D63-AA7790B5-710168AA665F84CAAD8AD9CB_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E4A33047FFD9D44A-CC9DE5AF-4F934D63-AA7790B5-710168AA665F84CAAD8AD9CB_see|text=|trigger=button}{sub-section}{sub-section:E4A33047FFD9D44A-CC9DE5AF-4F934D63-AA7790B5-710168AA665F84CAAD8AD9CB_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E4A33047FFD9D44A-CC9DE5AF-4F934D63-AA7790B5-710168AA665F84CAAD8AD9CB_see|text=|trigger=button}{sub-section}{sub-section:E4A33047FFD9D44A-CC9DE5AF-4F934D63-AA7790B5-710168AA665F84CAAD8AD9CB_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E4A33047FFD9D44A-CC9DE5AF-4F934D63-AA7790B5-710168AA665F84CAAD8AD9CB_sam|text=|trigger=button}{sub-section}{sub-section:E4A33047FFD9D44A-CC9DE5AF-4F934D63-AA7790B5-710168AA665F84CAAD8AD9CB_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=8AAA24493E406478-246FE375-4FCD41A4-898A8D1E-AC90588E4A4AA008336F5CCF}{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:8AAA24493E406478-246FE375-4FCD41A4-898A8D1E-AC90588E4A4AA008336F5CCF_des|text=|trigger=button}{sub-section}{sub-section:8AAA24493E406478-246FE375-4FCD41A4-898A8D1E-AC90588E4A4AA008336F5CCF_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:8AAA24493E406478-246FE375-4FCD41A4-898A8D1E-AC90588E4A4AA008336F5CCF_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8AAA24493E406478-246FE375-4FCD41A4-898A8D1E-AC90588E4A4AA008336F5CCF_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:8AAA24493E406478-246FE375-4FCD41A4-898A8D1E-AC90588E4A4AA008336F5CCF_ret|text=|trigger=button}{sub-section}{sub-section:8AAA24493E406478-246FE375-4FCD41A4-898A8D1E-AC90588E4A4AA008336F5CCF_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8AAA24493E406478-246FE375-4FCD41A4-898A8D1E-AC90588E4A4AA008336F5CCF_see|text=|trigger=button}{sub-section}{sub-section:8AAA24493E406478-246FE375-4FCD41A4-898A8D1E-AC90588E4A4AA008336F5CCF_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8AAA24493E406478-246FE375-4FCD41A4-898A8D1E-AC90588E4A4AA008336F5CCF_see|text=|trigger=button}{sub-section}{sub-section:8AAA24493E406478-246FE375-4FCD41A4-898A8D1E-AC90588E4A4AA008336F5CCF_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8AAA24493E406478-246FE375-4FCD41A4-898A8D1E-AC90588E4A4AA008336F5CCF_sam|text=|trigger=button}{sub-section}{sub-section:8AAA24493E406478-246FE375-4FCD41A4-898A8D1E-AC90588E4A4AA008336F5CCF_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=1BB9F3B78755B758-30A76C11-46AD40EB-8A47B3AE-4E0887FC6555A1F9B331DC41}{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:1BB9F3B78755B758-30A76C11-46AD40EB-8A47B3AE-4E0887FC6555A1F9B331DC41_des|text=|trigger=button}{sub-section}{sub-section:1BB9F3B78755B758-30A76C11-46AD40EB-8A47B3AE-4E0887FC6555A1F9B331DC41_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:1BB9F3B78755B758-30A76C11-46AD40EB-8A47B3AE-4E0887FC6555A1F9B331DC41_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1BB9F3B78755B758-30A76C11-46AD40EB-8A47B3AE-4E0887FC6555A1F9B331DC41_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:1BB9F3B78755B758-30A76C11-46AD40EB-8A47B3AE-4E0887FC6555A1F9B331DC41_ret|text=|trigger=button}{sub-section}{sub-section:1BB9F3B78755B758-30A76C11-46AD40EB-8A47B3AE-4E0887FC6555A1F9B331DC41_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1BB9F3B78755B758-30A76C11-46AD40EB-8A47B3AE-4E0887FC6555A1F9B331DC41_see|text=|trigger=button}{sub-section}{sub-section:1BB9F3B78755B758-30A76C11-46AD40EB-8A47B3AE-4E0887FC6555A1F9B331DC41_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1BB9F3B78755B758-30A76C11-46AD40EB-8A47B3AE-4E0887FC6555A1F9B331DC41_see|text=|trigger=button}{sub-section}{sub-section:1BB9F3B78755B758-30A76C11-46AD40EB-8A47B3AE-4E0887FC6555A1F9B331DC41_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1BB9F3B78755B758-30A76C11-46AD40EB-8A47B3AE-4E0887FC6555A1F9B331DC41_sam|text=|trigger=button}{sub-section}{sub-section:1BB9F3B78755B758-30A76C11-46AD40EB-8A47B3AE-4E0887FC6555A1F9B331DC41_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=64767C4E11F0FCAF-995C6592-4909442C-9FDFA1B7-E3894C7D7A11DBB99502523F}{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:64767C4E11F0FCAF-995C6592-4909442C-9FDFA1B7-E3894C7D7A11DBB99502523F_des|text=|trigger=button}{sub-section}{sub-section:64767C4E11F0FCAF-995C6592-4909442C-9FDFA1B7-E3894C7D7A11DBB99502523F_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:64767C4E11F0FCAF-995C6592-4909442C-9FDFA1B7-E3894C7D7A11DBB99502523F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:64767C4E11F0FCAF-995C6592-4909442C-9FDFA1B7-E3894C7D7A11DBB99502523F_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:64767C4E11F0FCAF-995C6592-4909442C-9FDFA1B7-E3894C7D7A11DBB99502523F_ret|text=|trigger=button}{sub-section}{sub-section:64767C4E11F0FCAF-995C6592-4909442C-9FDFA1B7-E3894C7D7A11DBB99502523F_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:64767C4E11F0FCAF-995C6592-4909442C-9FDFA1B7-E3894C7D7A11DBB99502523F_see|text=|trigger=button}{sub-section}{sub-section:64767C4E11F0FCAF-995C6592-4909442C-9FDFA1B7-E3894C7D7A11DBB99502523F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:64767C4E11F0FCAF-995C6592-4909442C-9FDFA1B7-E3894C7D7A11DBB99502523F_see|text=|trigger=button}{sub-section}{sub-section:64767C4E11F0FCAF-995C6592-4909442C-9FDFA1B7-E3894C7D7A11DBB99502523F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:64767C4E11F0FCAF-995C6592-4909442C-9FDFA1B7-E3894C7D7A11DBB99502523F_sam|text=|trigger=button}{sub-section}{sub-section:64767C4E11F0FCAF-995C6592-4909442C-9FDFA1B7-E3894C7D7A11DBB99502523F_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=18B069E75AA5C9BD-65AFC07F-4E5542A8-B441B048-4CE35A547176504C949C2E59}{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:18B069E75AA5C9BD-65AFC07F-4E5542A8-B441B048-4CE35A547176504C949C2E59_des|text=|trigger=button}{sub-section}{sub-section:18B069E75AA5C9BD-65AFC07F-4E5542A8-B441B048-4CE35A547176504C949C2E59_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:18B069E75AA5C9BD-65AFC07F-4E5542A8-B441B048-4CE35A547176504C949C2E59_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:18B069E75AA5C9BD-65AFC07F-4E5542A8-B441B048-4CE35A547176504C949C2E59_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:18B069E75AA5C9BD-65AFC07F-4E5542A8-B441B048-4CE35A547176504C949C2E59_ret|text=|trigger=button}{sub-section}{sub-section:18B069E75AA5C9BD-65AFC07F-4E5542A8-B441B048-4CE35A547176504C949C2E59_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:18B069E75AA5C9BD-65AFC07F-4E5542A8-B441B048-4CE35A547176504C949C2E59_see|text=|trigger=button}{sub-section}{sub-section:18B069E75AA5C9BD-65AFC07F-4E5542A8-B441B048-4CE35A547176504C949C2E59_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:18B069E75AA5C9BD-65AFC07F-4E5542A8-B441B048-4CE35A547176504C949C2E59_see|text=|trigger=button}{sub-section}{sub-section:18B069E75AA5C9BD-65AFC07F-4E5542A8-B441B048-4CE35A547176504C949C2E59_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:18B069E75AA5C9BD-65AFC07F-4E5542A8-B441B048-4CE35A547176504C949C2E59_sam|text=|trigger=button}{sub-section}{sub-section:18B069E75AA5C9BD-65AFC07F-4E5542A8-B441B048-4CE35A547176504C949C2E59_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=86CE0D0AB5C87ED8-37D27C2B-47B346D9-AD1FAE80-DCB4E133324A584DF0372040}{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:86CE0D0AB5C87ED8-37D27C2B-47B346D9-AD1FAE80-DCB4E133324A584DF0372040_des|text=|trigger=button}{sub-section}{sub-section:86CE0D0AB5C87ED8-37D27C2B-47B346D9-AD1FAE80-DCB4E133324A584DF0372040_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:86CE0D0AB5C87ED8-37D27C2B-47B346D9-AD1FAE80-DCB4E133324A584DF0372040_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:86CE0D0AB5C87ED8-37D27C2B-47B346D9-AD1FAE80-DCB4E133324A584DF0372040_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:86CE0D0AB5C87ED8-37D27C2B-47B346D9-AD1FAE80-DCB4E133324A584DF0372040_ret|text=|trigger=button}{sub-section}{sub-section:86CE0D0AB5C87ED8-37D27C2B-47B346D9-AD1FAE80-DCB4E133324A584DF0372040_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:86CE0D0AB5C87ED8-37D27C2B-47B346D9-AD1FAE80-DCB4E133324A584DF0372040_see|text=|trigger=button}{sub-section}{sub-section:86CE0D0AB5C87ED8-37D27C2B-47B346D9-AD1FAE80-DCB4E133324A584DF0372040_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:86CE0D0AB5C87ED8-37D27C2B-47B346D9-AD1FAE80-DCB4E133324A584DF0372040_see|text=|trigger=button}{sub-section}{sub-section:86CE0D0AB5C87ED8-37D27C2B-47B346D9-AD1FAE80-DCB4E133324A584DF0372040_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:86CE0D0AB5C87ED8-37D27C2B-47B346D9-AD1FAE80-DCB4E133324A584DF0372040_sam|text=|trigger=button}{sub-section}{sub-section:86CE0D0AB5C87ED8-37D27C2B-47B346D9-AD1FAE80-DCB4E133324A584DF0372040_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=D55C1A7E36AEEC9B-A4183289-402B4FC6-A9899C9D-BF3A138A2AF7C46A7C286340}{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:D55C1A7E36AEEC9B-A4183289-402B4FC6-A9899C9D-BF3A138A2AF7C46A7C286340_des|text=|trigger=button}{sub-section}{sub-section:D55C1A7E36AEEC9B-A4183289-402B4FC6-A9899C9D-BF3A138A2AF7C46A7C286340_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:D55C1A7E36AEEC9B-A4183289-402B4FC6-A9899C9D-BF3A138A2AF7C46A7C286340_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D55C1A7E36AEEC9B-A4183289-402B4FC6-A9899C9D-BF3A138A2AF7C46A7C286340_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D55C1A7E36AEEC9B-A4183289-402B4FC6-A9899C9D-BF3A138A2AF7C46A7C286340_ret|text=|trigger=button}{sub-section}{sub-section:D55C1A7E36AEEC9B-A4183289-402B4FC6-A9899C9D-BF3A138A2AF7C46A7C286340_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D55C1A7E36AEEC9B-A4183289-402B4FC6-A9899C9D-BF3A138A2AF7C46A7C286340_see|text=|trigger=button}{sub-section}{sub-section:D55C1A7E36AEEC9B-A4183289-402B4FC6-A9899C9D-BF3A138A2AF7C46A7C286340_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D55C1A7E36AEEC9B-A4183289-402B4FC6-A9899C9D-BF3A138A2AF7C46A7C286340_see|text=|trigger=button}{sub-section}{sub-section:D55C1A7E36AEEC9B-A4183289-402B4FC6-A9899C9D-BF3A138A2AF7C46A7C286340_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D55C1A7E36AEEC9B-A4183289-402B4FC6-A9899C9D-BF3A138A2AF7C46A7C286340_sam|text=|trigger=button}{sub-section}{sub-section:D55C1A7E36AEEC9B-A4183289-402B4FC6-A9899C9D-BF3A138A2AF7C46A7C286340_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=32AA2F40C11A2825-983D7FB3-469F4E6E-B1808890-470D77A0F2040138B17109C4}{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:32AA2F40C11A2825-983D7FB3-469F4E6E-B1808890-470D77A0F2040138B17109C4_des|text=|trigger=button}{sub-section}{sub-section:32AA2F40C11A2825-983D7FB3-469F4E6E-B1808890-470D77A0F2040138B17109C4_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:32AA2F40C11A2825-983D7FB3-469F4E6E-B1808890-470D77A0F2040138B17109C4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:32AA2F40C11A2825-983D7FB3-469F4E6E-B1808890-470D77A0F2040138B17109C4_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:32AA2F40C11A2825-983D7FB3-469F4E6E-B1808890-470D77A0F2040138B17109C4_ret|text=|trigger=button}{sub-section}{sub-section:32AA2F40C11A2825-983D7FB3-469F4E6E-B1808890-470D77A0F2040138B17109C4_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:32AA2F40C11A2825-983D7FB3-469F4E6E-B1808890-470D77A0F2040138B17109C4_see|text=|trigger=button}{sub-section}{sub-section:32AA2F40C11A2825-983D7FB3-469F4E6E-B1808890-470D77A0F2040138B17109C4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:32AA2F40C11A2825-983D7FB3-469F4E6E-B1808890-470D77A0F2040138B17109C4_see|text=|trigger=button}{sub-section}{sub-section:32AA2F40C11A2825-983D7FB3-469F4E6E-B1808890-470D77A0F2040138B17109C4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:32AA2F40C11A2825-983D7FB3-469F4E6E-B1808890-470D77A0F2040138B17109C4_sam|text=|trigger=button}{sub-section}{sub-section:32AA2F40C11A2825-983D7FB3-469F4E6E-B1808890-470D77A0F2040138B17109C4_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=1E9A0A77E9A6D460-D923D8CC-484C40A9-B22DB849-84CD0CA7C4B44E1DACE3914E}{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:1E9A0A77E9A6D460-D923D8CC-484C40A9-B22DB849-84CD0CA7C4B44E1DACE3914E_des|text=|trigger=button}{sub-section}{sub-section:1E9A0A77E9A6D460-D923D8CC-484C40A9-B22DB849-84CD0CA7C4B44E1DACE3914E_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:1E9A0A77E9A6D460-D923D8CC-484C40A9-B22DB849-84CD0CA7C4B44E1DACE3914E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1E9A0A77E9A6D460-D923D8CC-484C40A9-B22DB849-84CD0CA7C4B44E1DACE3914E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:1E9A0A77E9A6D460-D923D8CC-484C40A9-B22DB849-84CD0CA7C4B44E1DACE3914E_ret|text=|trigger=button}{sub-section}{sub-section:1E9A0A77E9A6D460-D923D8CC-484C40A9-B22DB849-84CD0CA7C4B44E1DACE3914E_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1E9A0A77E9A6D460-D923D8CC-484C40A9-B22DB849-84CD0CA7C4B44E1DACE3914E_see|text=|trigger=button}{sub-section}{sub-section:1E9A0A77E9A6D460-D923D8CC-484C40A9-B22DB849-84CD0CA7C4B44E1DACE3914E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1E9A0A77E9A6D460-D923D8CC-484C40A9-B22DB849-84CD0CA7C4B44E1DACE3914E_see|text=|trigger=button}{sub-section}{sub-section:1E9A0A77E9A6D460-D923D8CC-484C40A9-B22DB849-84CD0CA7C4B44E1DACE3914E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1E9A0A77E9A6D460-D923D8CC-484C40A9-B22DB849-84CD0CA7C4B44E1DACE3914E_sam|text=|trigger=button}{sub-section}{sub-section:1E9A0A77E9A6D460-D923D8CC-484C40A9-B22DB849-84CD0CA7C4B44E1DACE3914E_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=B5CDBEA3C508CCFB-39F4D64F-422841A8-9F7B95C6-C606A8C333C32350777A8390}{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:B5CDBEA3C508CCFB-39F4D64F-422841A8-9F7B95C6-C606A8C333C32350777A8390_des|text=|trigger=button}{sub-section}{sub-section:B5CDBEA3C508CCFB-39F4D64F-422841A8-9F7B95C6-C606A8C333C32350777A8390_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:B5CDBEA3C508CCFB-39F4D64F-422841A8-9F7B95C6-C606A8C333C32350777A8390_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B5CDBEA3C508CCFB-39F4D64F-422841A8-9F7B95C6-C606A8C333C32350777A8390_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:B5CDBEA3C508CCFB-39F4D64F-422841A8-9F7B95C6-C606A8C333C32350777A8390_ret|text=|trigger=button}{sub-section}{sub-section:B5CDBEA3C508CCFB-39F4D64F-422841A8-9F7B95C6-C606A8C333C32350777A8390_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B5CDBEA3C508CCFB-39F4D64F-422841A8-9F7B95C6-C606A8C333C32350777A8390_see|text=|trigger=button}{sub-section}{sub-section:B5CDBEA3C508CCFB-39F4D64F-422841A8-9F7B95C6-C606A8C333C32350777A8390_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B5CDBEA3C508CCFB-39F4D64F-422841A8-9F7B95C6-C606A8C333C32350777A8390_see|text=|trigger=button}{sub-section}{sub-section:B5CDBEA3C508CCFB-39F4D64F-422841A8-9F7B95C6-C606A8C333C32350777A8390_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B5CDBEA3C508CCFB-39F4D64F-422841A8-9F7B95C6-C606A8C333C32350777A8390_sam|text=|trigger=button}{sub-section}{sub-section:B5CDBEA3C508CCFB-39F4D64F-422841A8-9F7B95C6-C606A8C333C32350777A8390_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=A1B8C9DDC3D41219-DE283E12-49CC4CE5-867894E4-2F02A9E9BDF0F9117CFB3BD7}{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:A1B8C9DDC3D41219-DE283E12-49CC4CE5-867894E4-2F02A9E9BDF0F9117CFB3BD7_des|text=|trigger=button}{sub-section}{sub-section:A1B8C9DDC3D41219-DE283E12-49CC4CE5-867894E4-2F02A9E9BDF0F9117CFB3BD7_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:A1B8C9DDC3D41219-DE283E12-49CC4CE5-867894E4-2F02A9E9BDF0F9117CFB3BD7_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A1B8C9DDC3D41219-DE283E12-49CC4CE5-867894E4-2F02A9E9BDF0F9117CFB3BD7_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A1B8C9DDC3D41219-DE283E12-49CC4CE5-867894E4-2F02A9E9BDF0F9117CFB3BD7_ret|text=|trigger=button}{sub-section}{sub-section:A1B8C9DDC3D41219-DE283E12-49CC4CE5-867894E4-2F02A9E9BDF0F9117CFB3BD7_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A1B8C9DDC3D41219-DE283E12-49CC4CE5-867894E4-2F02A9E9BDF0F9117CFB3BD7_see|text=|trigger=button}{sub-section}{sub-section:A1B8C9DDC3D41219-DE283E12-49CC4CE5-867894E4-2F02A9E9BDF0F9117CFB3BD7_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A1B8C9DDC3D41219-DE283E12-49CC4CE5-867894E4-2F02A9E9BDF0F9117CFB3BD7_see|text=|trigger=button}{sub-section}{sub-section:A1B8C9DDC3D41219-DE283E12-49CC4CE5-867894E4-2F02A9E9BDF0F9117CFB3BD7_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A1B8C9DDC3D41219-DE283E12-49CC4CE5-867894E4-2F02A9E9BDF0F9117CFB3BD7_sam|text=|trigger=button}{sub-section}{sub-section:A1B8C9DDC3D41219-DE283E12-49CC4CE5-867894E4-2F02A9E9BDF0F9117CFB3BD7_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=6D44B729FC138931-400DDAE7-41C44953-A9C1A67E-EB1F5EB839BF82F546803AC8}{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:6D44B729FC138931-400DDAE7-41C44953-A9C1A67E-EB1F5EB839BF82F546803AC8_des|text=|trigger=button}{sub-section}{sub-section:6D44B729FC138931-400DDAE7-41C44953-A9C1A67E-EB1F5EB839BF82F546803AC8_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:6D44B729FC138931-400DDAE7-41C44953-A9C1A67E-EB1F5EB839BF82F546803AC8_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:6D44B729FC138931-400DDAE7-41C44953-A9C1A67E-EB1F5EB839BF82F546803AC8_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:6D44B729FC138931-400DDAE7-41C44953-A9C1A67E-EB1F5EB839BF82F546803AC8_ret|text=|trigger=button}{sub-section}{sub-section:6D44B729FC138931-400DDAE7-41C44953-A9C1A67E-EB1F5EB839BF82F546803AC8_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:6D44B729FC138931-400DDAE7-41C44953-A9C1A67E-EB1F5EB839BF82F546803AC8_see|text=|trigger=button}{sub-section}{sub-section:6D44B729FC138931-400DDAE7-41C44953-A9C1A67E-EB1F5EB839BF82F546803AC8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:6D44B729FC138931-400DDAE7-41C44953-A9C1A67E-EB1F5EB839BF82F546803AC8_see|text=|trigger=button}{sub-section}{sub-section:6D44B729FC138931-400DDAE7-41C44953-A9C1A67E-EB1F5EB839BF82F546803AC8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:6D44B729FC138931-400DDAE7-41C44953-A9C1A67E-EB1F5EB839BF82F546803AC8_sam|text=|trigger=button}{sub-section}{sub-section:6D44B729FC138931-400DDAE7-41C44953-A9C1A67E-EB1F5EB839BF82F546803AC8_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=049FEB78E0FD05F7-5D4E5F29-48464A9D-A1E0AFBF-B5331049CB71D2220E35CAD9}{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:049FEB78E0FD05F7-5D4E5F29-48464A9D-A1E0AFBF-B5331049CB71D2220E35CAD9_des|text=|trigger=button}{sub-section}{sub-section:049FEB78E0FD05F7-5D4E5F29-48464A9D-A1E0AFBF-B5331049CB71D2220E35CAD9_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:049FEB78E0FD05F7-5D4E5F29-48464A9D-A1E0AFBF-B5331049CB71D2220E35CAD9_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:049FEB78E0FD05F7-5D4E5F29-48464A9D-A1E0AFBF-B5331049CB71D2220E35CAD9_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:049FEB78E0FD05F7-5D4E5F29-48464A9D-A1E0AFBF-B5331049CB71D2220E35CAD9_ret|text=|trigger=button}{sub-section}{sub-section:049FEB78E0FD05F7-5D4E5F29-48464A9D-A1E0AFBF-B5331049CB71D2220E35CAD9_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:049FEB78E0FD05F7-5D4E5F29-48464A9D-A1E0AFBF-B5331049CB71D2220E35CAD9_see|text=|trigger=button}{sub-section}{sub-section:049FEB78E0FD05F7-5D4E5F29-48464A9D-A1E0AFBF-B5331049CB71D2220E35CAD9_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:049FEB78E0FD05F7-5D4E5F29-48464A9D-A1E0AFBF-B5331049CB71D2220E35CAD9_see|text=|trigger=button}{sub-section}{sub-section:049FEB78E0FD05F7-5D4E5F29-48464A9D-A1E0AFBF-B5331049CB71D2220E35CAD9_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:049FEB78E0FD05F7-5D4E5F29-48464A9D-A1E0AFBF-B5331049CB71D2220E35CAD9_sam|text=|trigger=button}{sub-section}{sub-section:049FEB78E0FD05F7-5D4E5F29-48464A9D-A1E0AFBF-B5331049CB71D2220E35CAD9_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=0F59B84EBF811D64-D29B9B74-42FF455A-A03EA0A2-F58735CC39DCB30516840B62}{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:0F59B84EBF811D64-D29B9B74-42FF455A-A03EA0A2-F58735CC39DCB30516840B62_des|text=|trigger=button}{sub-section}{sub-section:0F59B84EBF811D64-D29B9B74-42FF455A-A03EA0A2-F58735CC39DCB30516840B62_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:0F59B84EBF811D64-D29B9B74-42FF455A-A03EA0A2-F58735CC39DCB30516840B62_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0F59B84EBF811D64-D29B9B74-42FF455A-A03EA0A2-F58735CC39DCB30516840B62_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:0F59B84EBF811D64-D29B9B74-42FF455A-A03EA0A2-F58735CC39DCB30516840B62_ret|text=|trigger=button}{sub-section}{sub-section:0F59B84EBF811D64-D29B9B74-42FF455A-A03EA0A2-F58735CC39DCB30516840B62_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:0F59B84EBF811D64-D29B9B74-42FF455A-A03EA0A2-F58735CC39DCB30516840B62_see|text=|trigger=button}{sub-section}{sub-section:0F59B84EBF811D64-D29B9B74-42FF455A-A03EA0A2-F58735CC39DCB30516840B62_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0F59B84EBF811D64-D29B9B74-42FF455A-A03EA0A2-F58735CC39DCB30516840B62_see|text=|trigger=button}{sub-section}{sub-section:0F59B84EBF811D64-D29B9B74-42FF455A-A03EA0A2-F58735CC39DCB30516840B62_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:0F59B84EBF811D64-D29B9B74-42FF455A-A03EA0A2-F58735CC39DCB30516840B62_sam|text=|trigger=button}{sub-section}{sub-section:0F59B84EBF811D64-D29B9B74-42FF455A-A03EA0A2-F58735CC39DCB30516840B62_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=04330969F3560ECD-091182AE-4AA04010-8E5B8F10-090819743F3075A48247A01E}{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:04330969F3560ECD-091182AE-4AA04010-8E5B8F10-090819743F3075A48247A01E_des|text=|trigger=button}{sub-section}{sub-section:04330969F3560ECD-091182AE-4AA04010-8E5B8F10-090819743F3075A48247A01E_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:04330969F3560ECD-091182AE-4AA04010-8E5B8F10-090819743F3075A48247A01E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:04330969F3560ECD-091182AE-4AA04010-8E5B8F10-090819743F3075A48247A01E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:04330969F3560ECD-091182AE-4AA04010-8E5B8F10-090819743F3075A48247A01E_ret|text=|trigger=button}{sub-section}{sub-section:04330969F3560ECD-091182AE-4AA04010-8E5B8F10-090819743F3075A48247A01E_ret|trigger=none|class=sIndent}[Date]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:04330969F3560ECD-091182AE-4AA04010-8E5B8F10-090819743F3075A48247A01E_see|text=|trigger=button}{sub-section}{sub-section:04330969F3560ECD-091182AE-4AA04010-8E5B8F10-090819743F3075A48247A01E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:04330969F3560ECD-091182AE-4AA04010-8E5B8F10-090819743F3075A48247A01E_see|text=|trigger=button}{sub-section}{sub-section:04330969F3560ECD-091182AE-4AA04010-8E5B8F10-090819743F3075A48247A01E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:04330969F3560ECD-091182AE-4AA04010-8E5B8F10-090819743F3075A48247A01E_sam|text=|trigger=button}{sub-section}{sub-section:04330969F3560ECD-091182AE-4AA04010-8E5B8F10-090819743F3075A48247A01E_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=7E86D68723885A8F-6124D0BA-43F0466F-8675AA48-6C1C1431864BFA09957053F5}{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:7E86D68723885A8F-6124D0BA-43F0466F-8675AA48-6C1C1431864BFA09957053F5_des|text=|trigger=button}{sub-section}{sub-section:7E86D68723885A8F-6124D0BA-43F0466F-8675AA48-6C1C1431864BFA09957053F5_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:7E86D68723885A8F-6124D0BA-43F0466F-8675AA48-6C1C1431864BFA09957053F5_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7E86D68723885A8F-6124D0BA-43F0466F-8675AA48-6C1C1431864BFA09957053F5_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:7E86D68723885A8F-6124D0BA-43F0466F-8675AA48-6C1C1431864BFA09957053F5_ret|text=|trigger=button}{sub-section}{sub-section:7E86D68723885A8F-6124D0BA-43F0466F-8675AA48-6C1C1431864BFA09957053F5_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:7E86D68723885A8F-6124D0BA-43F0466F-8675AA48-6C1C1431864BFA09957053F5_see|text=|trigger=button}{sub-section}{sub-section:7E86D68723885A8F-6124D0BA-43F0466F-8675AA48-6C1C1431864BFA09957053F5_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7E86D68723885A8F-6124D0BA-43F0466F-8675AA48-6C1C1431864BFA09957053F5_see|text=|trigger=button}{sub-section}{sub-section:7E86D68723885A8F-6124D0BA-43F0466F-8675AA48-6C1C1431864BFA09957053F5_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7E86D68723885A8F-6124D0BA-43F0466F-8675AA48-6C1C1431864BFA09957053F5_sam|text=|trigger=button}{sub-section}{sub-section:7E86D68723885A8F-6124D0BA-43F0466F-8675AA48-6C1C1431864BFA09957053F5_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=7359462EA378CF83-6C2020D6-4B144521-98F28809-668E54AA080D65135172BAB4}{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:7359462EA378CF83-6C2020D6-4B144521-98F28809-668E54AA080D65135172BAB4_des|text=|trigger=button}{sub-section}{sub-section:7359462EA378CF83-6C2020D6-4B144521-98F28809-668E54AA080D65135172BAB4_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:7359462EA378CF83-6C2020D6-4B144521-98F28809-668E54AA080D65135172BAB4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7359462EA378CF83-6C2020D6-4B144521-98F28809-668E54AA080D65135172BAB4_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:7359462EA378CF83-6C2020D6-4B144521-98F28809-668E54AA080D65135172BAB4_ret|text=|trigger=button}{sub-section}{sub-section:7359462EA378CF83-6C2020D6-4B144521-98F28809-668E54AA080D65135172BAB4_ret|trigger=none|class=sIndent}[JSFile]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:7359462EA378CF83-6C2020D6-4B144521-98F28809-668E54AA080D65135172BAB4_see|text=|trigger=button}{sub-section}{sub-section:7359462EA378CF83-6C2020D6-4B144521-98F28809-668E54AA080D65135172BAB4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7359462EA378CF83-6C2020D6-4B144521-98F28809-668E54AA080D65135172BAB4_see|text=|trigger=button}{sub-section}{sub-section:7359462EA378CF83-6C2020D6-4B144521-98F28809-668E54AA080D65135172BAB4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7359462EA378CF83-6C2020D6-4B144521-98F28809-668E54AA080D65135172BAB4_sam|text=|trigger=button}{sub-section}{sub-section:7359462EA378CF83-6C2020D6-4B144521-98F28809-668E54AA080D65135172BAB4_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=D59889D6C3601D21-C90C9ACF-42934497-A1CCBBA6-8F1B3D3AB4E1AEC8E9015A68}{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:D59889D6C3601D21-C90C9ACF-42934497-A1CCBBA6-8F1B3D3AB4E1AEC8E9015A68_des|text=|trigger=button}{sub-section}{sub-section:D59889D6C3601D21-C90C9ACF-42934497-A1CCBBA6-8F1B3D3AB4E1AEC8E9015A68_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:D59889D6C3601D21-C90C9ACF-42934497-A1CCBBA6-8F1B3D3AB4E1AEC8E9015A68_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D59889D6C3601D21-C90C9ACF-42934497-A1CCBBA6-8F1B3D3AB4E1AEC8E9015A68_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D59889D6C3601D21-C90C9ACF-42934497-A1CCBBA6-8F1B3D3AB4E1AEC8E9015A68_ret|text=|trigger=button}{sub-section}{sub-section:D59889D6C3601D21-C90C9ACF-42934497-A1CCBBA6-8F1B3D3AB4E1AEC8E9015A68_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D59889D6C3601D21-C90C9ACF-42934497-A1CCBBA6-8F1B3D3AB4E1AEC8E9015A68_see|text=|trigger=button}{sub-section}{sub-section:D59889D6C3601D21-C90C9ACF-42934497-A1CCBBA6-8F1B3D3AB4E1AEC8E9015A68_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D59889D6C3601D21-C90C9ACF-42934497-A1CCBBA6-8F1B3D3AB4E1AEC8E9015A68_see|text=|trigger=button}{sub-section}{sub-section:D59889D6C3601D21-C90C9ACF-42934497-A1CCBBA6-8F1B3D3AB4E1AEC8E9015A68_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D59889D6C3601D21-C90C9ACF-42934497-A1CCBBA6-8F1B3D3AB4E1AEC8E9015A68_sam|text=|trigger=button}{sub-section}{sub-section:D59889D6C3601D21-C90C9ACF-42934497-A1CCBBA6-8F1B3D3AB4E1AEC8E9015A68_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=3AAA9FC14AF8EFD2-6A17F925-4DE047C4-ABA8BF72-2F7B59A1C504192F7AD6174D}{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:3AAA9FC14AF8EFD2-6A17F925-4DE047C4-ABA8BF72-2F7B59A1C504192F7AD6174D_des|text=|trigger=button}{sub-section}{sub-section:3AAA9FC14AF8EFD2-6A17F925-4DE047C4-ABA8BF72-2F7B59A1C504192F7AD6174D_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:3AAA9FC14AF8EFD2-6A17F925-4DE047C4-ABA8BF72-2F7B59A1C504192F7AD6174D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3AAA9FC14AF8EFD2-6A17F925-4DE047C4-ABA8BF72-2F7B59A1C504192F7AD6174D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:3AAA9FC14AF8EFD2-6A17F925-4DE047C4-ABA8BF72-2F7B59A1C504192F7AD6174D_ret|text=|trigger=button}{sub-section}{sub-section:3AAA9FC14AF8EFD2-6A17F925-4DE047C4-ABA8BF72-2F7B59A1C504192F7AD6174D_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:3AAA9FC14AF8EFD2-6A17F925-4DE047C4-ABA8BF72-2F7B59A1C504192F7AD6174D_see|text=|trigger=button}{sub-section}{sub-section:3AAA9FC14AF8EFD2-6A17F925-4DE047C4-ABA8BF72-2F7B59A1C504192F7AD6174D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3AAA9FC14AF8EFD2-6A17F925-4DE047C4-ABA8BF72-2F7B59A1C504192F7AD6174D_see|text=|trigger=button}{sub-section}{sub-section:3AAA9FC14AF8EFD2-6A17F925-4DE047C4-ABA8BF72-2F7B59A1C504192F7AD6174D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3AAA9FC14AF8EFD2-6A17F925-4DE047C4-ABA8BF72-2F7B59A1C504192F7AD6174D_sam|text=|trigger=button}{sub-section}{sub-section:3AAA9FC14AF8EFD2-6A17F925-4DE047C4-ABA8BF72-2F7B59A1C504192F7AD6174D_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=5379AC9C4079E58B-BB3CE426-439341A3-933B8356-095B888391B072F5C4CC908E}{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:5379AC9C4079E58B-BB3CE426-439341A3-933B8356-095B888391B072F5C4CC908E_des|text=|trigger=button}{sub-section}{sub-section:5379AC9C4079E58B-BB3CE426-439341A3-933B8356-095B888391B072F5C4CC908E_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:5379AC9C4079E58B-BB3CE426-439341A3-933B8356-095B888391B072F5C4CC908E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5379AC9C4079E58B-BB3CE426-439341A3-933B8356-095B888391B072F5C4CC908E_prs|trigger=none}destination
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:5379AC9C4079E58B-BB3CE426-439341A3-933B8356-095B888391B072F5C4CC908E_ret|text=|trigger=button}{sub-section}{sub-section:5379AC9C4079E58B-BB3CE426-439341A3-933B8356-095B888391B072F5C4CC908E_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5379AC9C4079E58B-BB3CE426-439341A3-933B8356-095B888391B072F5C4CC908E_see|text=|trigger=button}{sub-section}{sub-section:5379AC9C4079E58B-BB3CE426-439341A3-933B8356-095B888391B072F5C4CC908E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5379AC9C4079E58B-BB3CE426-439341A3-933B8356-095B888391B072F5C4CC908E_see|text=|trigger=button}{sub-section}{sub-section:5379AC9C4079E58B-BB3CE426-439341A3-933B8356-095B888391B072F5C4CC908E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5379AC9C4079E58B-BB3CE426-439341A3-933B8356-095B888391B072F5C4CC908E_sam|text=|trigger=button}{sub-section}{sub-section:5379AC9C4079E58B-BB3CE426-439341A3-933B8356-095B888391B072F5C4CC908E_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=E821D552CB52B8B7-4F5F41C2-4DCB4555-8F06BBD8-474C2A647EFEDB9B70731849}{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:E821D552CB52B8B7-4F5F41C2-4DCB4555-8F06BBD8-474C2A647EFEDB9B70731849_des|text=|trigger=button}{sub-section}{sub-section:E821D552CB52B8B7-4F5F41C2-4DCB4555-8F06BBD8-474C2A647EFEDB9B70731849_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:E821D552CB52B8B7-4F5F41C2-4DCB4555-8F06BBD8-474C2A647EFEDB9B70731849_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E821D552CB52B8B7-4F5F41C2-4DCB4555-8F06BBD8-474C2A647EFEDB9B70731849_prs|trigger=none}date
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:E821D552CB52B8B7-4F5F41C2-4DCB4555-8F06BBD8-474C2A647EFEDB9B70731849_ret|text=|trigger=button}{sub-section}{sub-section:E821D552CB52B8B7-4F5F41C2-4DCB4555-8F06BBD8-474C2A647EFEDB9B70731849_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E821D552CB52B8B7-4F5F41C2-4DCB4555-8F06BBD8-474C2A647EFEDB9B70731849_see|text=|trigger=button}{sub-section}{sub-section:E821D552CB52B8B7-4F5F41C2-4DCB4555-8F06BBD8-474C2A647EFEDB9B70731849_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E821D552CB52B8B7-4F5F41C2-4DCB4555-8F06BBD8-474C2A647EFEDB9B70731849_see|text=|trigger=button}{sub-section}{sub-section:E821D552CB52B8B7-4F5F41C2-4DCB4555-8F06BBD8-474C2A647EFEDB9B70731849_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E821D552CB52B8B7-4F5F41C2-4DCB4555-8F06BBD8-474C2A647EFEDB9B70731849_sam|text=|trigger=button}{sub-section}{sub-section:E821D552CB52B8B7-4F5F41C2-4DCB4555-8F06BBD8-474C2A647EFEDB9B70731849_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=C2DEF19335B82E08-545C2EDA-48704C40-B4D89761-DA937801F5FCE21AE6655600}{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:C2DEF19335B82E08-545C2EDA-48704C40-B4D89761-DA937801F5FCE21AE6655600_des|text=|trigger=button}{sub-section}{sub-section:C2DEF19335B82E08-545C2EDA-48704C40-B4D89761-DA937801F5FCE21AE6655600_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:C2DEF19335B82E08-545C2EDA-48704C40-B4D89761-DA937801F5FCE21AE6655600_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C2DEF19335B82E08-545C2EDA-48704C40-B4D89761-DA937801F5FCE21AE6655600_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C2DEF19335B82E08-545C2EDA-48704C40-B4D89761-DA937801F5FCE21AE6655600_ret|text=|trigger=button}{sub-section}{sub-section:C2DEF19335B82E08-545C2EDA-48704C40-B4D89761-DA937801F5FCE21AE6655600_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C2DEF19335B82E08-545C2EDA-48704C40-B4D89761-DA937801F5FCE21AE6655600_see|text=|trigger=button}{sub-section}{sub-section:C2DEF19335B82E08-545C2EDA-48704C40-B4D89761-DA937801F5FCE21AE6655600_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C2DEF19335B82E08-545C2EDA-48704C40-B4D89761-DA937801F5FCE21AE6655600_see|text=|trigger=button}{sub-section}{sub-section:C2DEF19335B82E08-545C2EDA-48704C40-B4D89761-DA937801F5FCE21AE6655600_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C2DEF19335B82E08-545C2EDA-48704C40-B4D89761-DA937801F5FCE21AE6655600_sam|text=|trigger=button}{sub-section}{sub-section:C2DEF19335B82E08-545C2EDA-48704C40-B4D89761-DA937801F5FCE21AE6655600_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=D8B088A384859CA9-827DD557-491947A1-A756B476-FE35C61DE2CCB56CBEFD68A3}{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:D8B088A384859CA9-827DD557-491947A1-A756B476-FE35C61DE2CCB56CBEFD68A3_des|text=|trigger=button}{sub-section}{sub-section:D8B088A384859CA9-827DD557-491947A1-A756B476-FE35C61DE2CCB56CBEFD68A3_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:D8B088A384859CA9-827DD557-491947A1-A756B476-FE35C61DE2CCB56CBEFD68A3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D8B088A384859CA9-827DD557-491947A1-A756B476-FE35C61DE2CCB56CBEFD68A3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D8B088A384859CA9-827DD557-491947A1-A756B476-FE35C61DE2CCB56CBEFD68A3_ret|text=|trigger=button}{sub-section}{sub-section:D8B088A384859CA9-827DD557-491947A1-A756B476-FE35C61DE2CCB56CBEFD68A3_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D8B088A384859CA9-827DD557-491947A1-A756B476-FE35C61DE2CCB56CBEFD68A3_see|text=|trigger=button}{sub-section}{sub-section:D8B088A384859CA9-827DD557-491947A1-A756B476-FE35C61DE2CCB56CBEFD68A3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D8B088A384859CA9-827DD557-491947A1-A756B476-FE35C61DE2CCB56CBEFD68A3_see|text=|trigger=button}{sub-section}{sub-section:D8B088A384859CA9-827DD557-491947A1-A756B476-FE35C61DE2CCB56CBEFD68A3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D8B088A384859CA9-827DD557-491947A1-A756B476-FE35C61DE2CCB56CBEFD68A3_sam|text=|trigger=button}{sub-section}{sub-section:D8B088A384859CA9-827DD557-491947A1-A756B476-FE35C61DE2CCB56CBEFD68A3_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}