{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=63A23B05-C8CA-41F5-BE19-05E3C8CB223A}{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:63A23B05-C8CA-41F5-BE19-05E3C8CB223A_des|text=|trigger=button}{sub-section}{sub-section:63A23B05-C8CA-41F5-BE19-05E3C8CB223A_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:63A23B05-C8CA-41F5-BE19-05E3C8CB223A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:63A23B05-C8CA-41F5-BE19-05E3C8CB223A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:63A23B05-C8CA-41F5-BE19-05E3C8CB223A_ret|text=|trigger=button}{sub-section}{sub-section:63A23B05-C8CA-41F5-BE19-05E3C8CB223A_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:63A23B05-C8CA-41F5-BE19-05E3C8CB223A_see|text=|trigger=button}{sub-section}{sub-section:63A23B05-C8CA-41F5-BE19-05E3C8CB223A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:63A23B05-C8CA-41F5-BE19-05E3C8CB223A_see|text=|trigger=button}{sub-section}{sub-section:63A23B05-C8CA-41F5-BE19-05E3C8CB223A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:63A23B05-C8CA-41F5-BE19-05E3C8CB223A_sam|text=|trigger=button}{sub-section}{sub-section:63A23B05-C8CA-41F5-BE19-05E3C8CB223A_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=532B81B8-7061-4641-B9CC-C2A752C0BFED}{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:532B81B8-7061-4641-B9CC-C2A752C0BFED_des|text=|trigger=button}{sub-section}{sub-section:532B81B8-7061-4641-B9CC-C2A752C0BFED_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:532B81B8-7061-4641-B9CC-C2A752C0BFED_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:532B81B8-7061-4641-B9CC-C2A752C0BFED_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:532B81B8-7061-4641-B9CC-C2A752C0BFED_ret|text=|trigger=button}{sub-section}{sub-section:532B81B8-7061-4641-B9CC-C2A752C0BFED_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:532B81B8-7061-4641-B9CC-C2A752C0BFED_see|text=|trigger=button}{sub-section}{sub-section:532B81B8-7061-4641-B9CC-C2A752C0BFED_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:532B81B8-7061-4641-B9CC-C2A752C0BFED_see|text=|trigger=button}{sub-section}{sub-section:532B81B8-7061-4641-B9CC-C2A752C0BFED_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:532B81B8-7061-4641-B9CC-C2A752C0BFED_sam|text=|trigger=button}{sub-section}{sub-section:532B81B8-7061-4641-B9CC-C2A752C0BFED_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=396CFF23-F5C0-4445-A40C-85E17EF80E43}{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:396CFF23-F5C0-4445-A40C-85E17EF80E43_des|text=|trigger=button}{sub-section}{sub-section:396CFF23-F5C0-4445-A40C-85E17EF80E43_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:396CFF23-F5C0-4445-A40C-85E17EF80E43_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:396CFF23-F5C0-4445-A40C-85E17EF80E43_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:396CFF23-F5C0-4445-A40C-85E17EF80E43_ret|text=|trigger=button}{sub-section}{sub-section:396CFF23-F5C0-4445-A40C-85E17EF80E43_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:396CFF23-F5C0-4445-A40C-85E17EF80E43_see|text=|trigger=button}{sub-section}{sub-section:396CFF23-F5C0-4445-A40C-85E17EF80E43_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:396CFF23-F5C0-4445-A40C-85E17EF80E43_see|text=|trigger=button}{sub-section}{sub-section:396CFF23-F5C0-4445-A40C-85E17EF80E43_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:396CFF23-F5C0-4445-A40C-85E17EF80E43_sam|text=|trigger=button}{sub-section}{sub-section:396CFF23-F5C0-4445-A40C-85E17EF80E43_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=FEAF19BC-67D2-411B-9B6C-C3C88BF7263A}{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:FEAF19BC-67D2-411B-9B6C-C3C88BF7263A_des|text=|trigger=button}{sub-section}{sub-section:FEAF19BC-67D2-411B-9B6C-C3C88BF7263A_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:FEAF19BC-67D2-411B-9B6C-C3C88BF7263A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FEAF19BC-67D2-411B-9B6C-C3C88BF7263A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:FEAF19BC-67D2-411B-9B6C-C3C88BF7263A_ret|text=|trigger=button}{sub-section}{sub-section:FEAF19BC-67D2-411B-9B6C-C3C88BF7263A_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FEAF19BC-67D2-411B-9B6C-C3C88BF7263A_see|text=|trigger=button}{sub-section}{sub-section:FEAF19BC-67D2-411B-9B6C-C3C88BF7263A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FEAF19BC-67D2-411B-9B6C-C3C88BF7263A_see|text=|trigger=button}{sub-section}{sub-section:FEAF19BC-67D2-411B-9B6C-C3C88BF7263A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FEAF19BC-67D2-411B-9B6C-C3C88BF7263A_sam|text=|trigger=button}{sub-section}{sub-section:FEAF19BC-67D2-411B-9B6C-C3C88BF7263A_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=E756576F-0063-49F0-9C7B-8A3159DFEC58}{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:E756576F-0063-49F0-9C7B-8A3159DFEC58_des|text=|trigger=button}{sub-section}{sub-section:E756576F-0063-49F0-9C7B-8A3159DFEC58_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:E756576F-0063-49F0-9C7B-8A3159DFEC58_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E756576F-0063-49F0-9C7B-8A3159DFEC58_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:E756576F-0063-49F0-9C7B-8A3159DFEC58_ret|text=|trigger=button}{sub-section}{sub-section:E756576F-0063-49F0-9C7B-8A3159DFEC58_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E756576F-0063-49F0-9C7B-8A3159DFEC58_see|text=|trigger=button}{sub-section}{sub-section:E756576F-0063-49F0-9C7B-8A3159DFEC58_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E756576F-0063-49F0-9C7B-8A3159DFEC58_see|text=|trigger=button}{sub-section}{sub-section:E756576F-0063-49F0-9C7B-8A3159DFEC58_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E756576F-0063-49F0-9C7B-8A3159DFEC58_sam|text=|trigger=button}{sub-section}{sub-section:E756576F-0063-49F0-9C7B-8A3159DFEC58_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=E8EBEFE1-B0FA-4D05-A50A-84847217DFFB}{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:E8EBEFE1-B0FA-4D05-A50A-84847217DFFB_des|text=|trigger=button}{sub-section}{sub-section:E8EBEFE1-B0FA-4D05-A50A-84847217DFFB_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:E8EBEFE1-B0FA-4D05-A50A-84847217DFFB_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E8EBEFE1-B0FA-4D05-A50A-84847217DFFB_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:E8EBEFE1-B0FA-4D05-A50A-84847217DFFB_ret|text=|trigger=button}{sub-section}{sub-section:E8EBEFE1-B0FA-4D05-A50A-84847217DFFB_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E8EBEFE1-B0FA-4D05-A50A-84847217DFFB_see|text=|trigger=button}{sub-section}{sub-section:E8EBEFE1-B0FA-4D05-A50A-84847217DFFB_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E8EBEFE1-B0FA-4D05-A50A-84847217DFFB_see|text=|trigger=button}{sub-section}{sub-section:E8EBEFE1-B0FA-4D05-A50A-84847217DFFB_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E8EBEFE1-B0FA-4D05-A50A-84847217DFFB_sam|text=|trigger=button}{sub-section}{sub-section:E8EBEFE1-B0FA-4D05-A50A-84847217DFFB_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=0FCC30EC-6252-4320-A14E-6A78A613D1E9}{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:0FCC30EC-6252-4320-A14E-6A78A613D1E9_des|text=|trigger=button}{sub-section}{sub-section:0FCC30EC-6252-4320-A14E-6A78A613D1E9_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:0FCC30EC-6252-4320-A14E-6A78A613D1E9_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0FCC30EC-6252-4320-A14E-6A78A613D1E9_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:0FCC30EC-6252-4320-A14E-6A78A613D1E9_ret|text=|trigger=button}{sub-section}{sub-section:0FCC30EC-6252-4320-A14E-6A78A613D1E9_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:0FCC30EC-6252-4320-A14E-6A78A613D1E9_see|text=|trigger=button}{sub-section}{sub-section:0FCC30EC-6252-4320-A14E-6A78A613D1E9_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0FCC30EC-6252-4320-A14E-6A78A613D1E9_see|text=|trigger=button}{sub-section}{sub-section:0FCC30EC-6252-4320-A14E-6A78A613D1E9_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:0FCC30EC-6252-4320-A14E-6A78A613D1E9_sam|text=|trigger=button}{sub-section}{sub-section:0FCC30EC-6252-4320-A14E-6A78A613D1E9_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=FDFB266B-51D6-4F6D-B847-B2D2DAACEBDE}{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:FDFB266B-51D6-4F6D-B847-B2D2DAACEBDE_des|text=|trigger=button}{sub-section}{sub-section:FDFB266B-51D6-4F6D-B847-B2D2DAACEBDE_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:FDFB266B-51D6-4F6D-B847-B2D2DAACEBDE_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FDFB266B-51D6-4F6D-B847-B2D2DAACEBDE_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:FDFB266B-51D6-4F6D-B847-B2D2DAACEBDE_ret|text=|trigger=button}{sub-section}{sub-section:FDFB266B-51D6-4F6D-B847-B2D2DAACEBDE_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FDFB266B-51D6-4F6D-B847-B2D2DAACEBDE_see|text=|trigger=button}{sub-section}{sub-section:FDFB266B-51D6-4F6D-B847-B2D2DAACEBDE_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FDFB266B-51D6-4F6D-B847-B2D2DAACEBDE_see|text=|trigger=button}{sub-section}{sub-section:FDFB266B-51D6-4F6D-B847-B2D2DAACEBDE_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FDFB266B-51D6-4F6D-B847-B2D2DAACEBDE_sam|text=|trigger=button}{sub-section}{sub-section:FDFB266B-51D6-4F6D-B847-B2D2DAACEBDE_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=8FB7260F-C51C-4CC2-AA07-6871129EB735}{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:8FB7260F-C51C-4CC2-AA07-6871129EB735_des|text=|trigger=button}{sub-section}{sub-section:8FB7260F-C51C-4CC2-AA07-6871129EB735_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:8FB7260F-C51C-4CC2-AA07-6871129EB735_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8FB7260F-C51C-4CC2-AA07-6871129EB735_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:8FB7260F-C51C-4CC2-AA07-6871129EB735_ret|text=|trigger=button}{sub-section}{sub-section:8FB7260F-C51C-4CC2-AA07-6871129EB735_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8FB7260F-C51C-4CC2-AA07-6871129EB735_see|text=|trigger=button}{sub-section}{sub-section:8FB7260F-C51C-4CC2-AA07-6871129EB735_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8FB7260F-C51C-4CC2-AA07-6871129EB735_see|text=|trigger=button}{sub-section}{sub-section:8FB7260F-C51C-4CC2-AA07-6871129EB735_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8FB7260F-C51C-4CC2-AA07-6871129EB735_sam|text=|trigger=button}{sub-section}{sub-section:8FB7260F-C51C-4CC2-AA07-6871129EB735_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=12DA1014-6C29-467F-90D2-A4C5E733D95D}{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:12DA1014-6C29-467F-90D2-A4C5E733D95D_des|text=|trigger=button}{sub-section}{sub-section:12DA1014-6C29-467F-90D2-A4C5E733D95D_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:12DA1014-6C29-467F-90D2-A4C5E733D95D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:12DA1014-6C29-467F-90D2-A4C5E733D95D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:12DA1014-6C29-467F-90D2-A4C5E733D95D_ret|text=|trigger=button}{sub-section}{sub-section:12DA1014-6C29-467F-90D2-A4C5E733D95D_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:12DA1014-6C29-467F-90D2-A4C5E733D95D_see|text=|trigger=button}{sub-section}{sub-section:12DA1014-6C29-467F-90D2-A4C5E733D95D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:12DA1014-6C29-467F-90D2-A4C5E733D95D_see|text=|trigger=button}{sub-section}{sub-section:12DA1014-6C29-467F-90D2-A4C5E733D95D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:12DA1014-6C29-467F-90D2-A4C5E733D95D_sam|text=|trigger=button}{sub-section}{sub-section:12DA1014-6C29-467F-90D2-A4C5E733D95D_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=4268CA7B-22A7-42AB-B910-9B63CEE149FD}{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:4268CA7B-22A7-42AB-B910-9B63CEE149FD_des|text=|trigger=button}{sub-section}{sub-section:4268CA7B-22A7-42AB-B910-9B63CEE149FD_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:4268CA7B-22A7-42AB-B910-9B63CEE149FD_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4268CA7B-22A7-42AB-B910-9B63CEE149FD_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:4268CA7B-22A7-42AB-B910-9B63CEE149FD_ret|text=|trigger=button}{sub-section}{sub-section:4268CA7B-22A7-42AB-B910-9B63CEE149FD_ret|trigger=none|class=sIndent}[JSFile]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4268CA7B-22A7-42AB-B910-9B63CEE149FD_see|text=|trigger=button}{sub-section}{sub-section:4268CA7B-22A7-42AB-B910-9B63CEE149FD_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4268CA7B-22A7-42AB-B910-9B63CEE149FD_see|text=|trigger=button}{sub-section}{sub-section:4268CA7B-22A7-42AB-B910-9B63CEE149FD_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4268CA7B-22A7-42AB-B910-9B63CEE149FD_sam|text=|trigger=button}{sub-section}{sub-section:4268CA7B-22A7-42AB-B910-9B63CEE149FD_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=A876C38A-5D31-484C-A640-576FB999020D}{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:A876C38A-5D31-484C-A640-576FB999020D_des|text=|trigger=button}{sub-section}{sub-section:A876C38A-5D31-484C-A640-576FB999020D_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:A876C38A-5D31-484C-A640-576FB999020D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A876C38A-5D31-484C-A640-576FB999020D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A876C38A-5D31-484C-A640-576FB999020D_ret|text=|trigger=button}{sub-section}{sub-section:A876C38A-5D31-484C-A640-576FB999020D_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A876C38A-5D31-484C-A640-576FB999020D_see|text=|trigger=button}{sub-section}{sub-section:A876C38A-5D31-484C-A640-576FB999020D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A876C38A-5D31-484C-A640-576FB999020D_see|text=|trigger=button}{sub-section}{sub-section:A876C38A-5D31-484C-A640-576FB999020D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A876C38A-5D31-484C-A640-576FB999020D_sam|text=|trigger=button}{sub-section}{sub-section:A876C38A-5D31-484C-A640-576FB999020D_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=2EE24EC2-7243-425F-A459-5B99A231B9D3}{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:2EE24EC2-7243-425F-A459-5B99A231B9D3_des|text=|trigger=button}{sub-section}{sub-section:2EE24EC2-7243-425F-A459-5B99A231B9D3_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:2EE24EC2-7243-425F-A459-5B99A231B9D3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2EE24EC2-7243-425F-A459-5B99A231B9D3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:2EE24EC2-7243-425F-A459-5B99A231B9D3_ret|text=|trigger=button}{sub-section}{sub-section:2EE24EC2-7243-425F-A459-5B99A231B9D3_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2EE24EC2-7243-425F-A459-5B99A231B9D3_see|text=|trigger=button}{sub-section}{sub-section:2EE24EC2-7243-425F-A459-5B99A231B9D3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2EE24EC2-7243-425F-A459-5B99A231B9D3_see|text=|trigger=button}{sub-section}{sub-section:2EE24EC2-7243-425F-A459-5B99A231B9D3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2EE24EC2-7243-425F-A459-5B99A231B9D3_sam|text=|trigger=button}{sub-section}{sub-section:2EE24EC2-7243-425F-A459-5B99A231B9D3_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=A11AFF37-BC31-4FC7-A0E7-24C689A4EBE5}{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:A11AFF37-BC31-4FC7-A0E7-24C689A4EBE5_des|text=|trigger=button}{sub-section}{sub-section:A11AFF37-BC31-4FC7-A0E7-24C689A4EBE5_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:A11AFF37-BC31-4FC7-A0E7-24C689A4EBE5_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A11AFF37-BC31-4FC7-A0E7-24C689A4EBE5_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A11AFF37-BC31-4FC7-A0E7-24C689A4EBE5_ret|text=|trigger=button}{sub-section}{sub-section:A11AFF37-BC31-4FC7-A0E7-24C689A4EBE5_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A11AFF37-BC31-4FC7-A0E7-24C689A4EBE5_see|text=|trigger=button}{sub-section}{sub-section:A11AFF37-BC31-4FC7-A0E7-24C689A4EBE5_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A11AFF37-BC31-4FC7-A0E7-24C689A4EBE5_see|text=|trigger=button}{sub-section}{sub-section:A11AFF37-BC31-4FC7-A0E7-24C689A4EBE5_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A11AFF37-BC31-4FC7-A0E7-24C689A4EBE5_sam|text=|trigger=button}{sub-section}{sub-section:A11AFF37-BC31-4FC7-A0E7-24C689A4EBE5_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=13E5C617-AA6D-4F2E-A954-D2223D1DC17A}{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:13E5C617-AA6D-4F2E-A954-D2223D1DC17A_des|text=|trigger=button}{sub-section}{sub-section:13E5C617-AA6D-4F2E-A954-D2223D1DC17A_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:13E5C617-AA6D-4F2E-A954-D2223D1DC17A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:13E5C617-AA6D-4F2E-A954-D2223D1DC17A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:13E5C617-AA6D-4F2E-A954-D2223D1DC17A_ret|text=|trigger=button}{sub-section}{sub-section:13E5C617-AA6D-4F2E-A954-D2223D1DC17A_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:13E5C617-AA6D-4F2E-A954-D2223D1DC17A_see|text=|trigger=button}{sub-section}{sub-section:13E5C617-AA6D-4F2E-A954-D2223D1DC17A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:13E5C617-AA6D-4F2E-A954-D2223D1DC17A_see|text=|trigger=button}{sub-section}{sub-section:13E5C617-AA6D-4F2E-A954-D2223D1DC17A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:13E5C617-AA6D-4F2E-A954-D2223D1DC17A_sam|text=|trigger=button}{sub-section}{sub-section:13E5C617-AA6D-4F2E-A954-D2223D1DC17A_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=2F66C6EF-8D65-4919-A306-F150483D8753}{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:2F66C6EF-8D65-4919-A306-F150483D8753_des|text=|trigger=button}{sub-section}{sub-section:2F66C6EF-8D65-4919-A306-F150483D8753_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:2F66C6EF-8D65-4919-A306-F150483D8753_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2F66C6EF-8D65-4919-A306-F150483D8753_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:2F66C6EF-8D65-4919-A306-F150483D8753_ret|text=|trigger=button}{sub-section}{sub-section:2F66C6EF-8D65-4919-A306-F150483D8753_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2F66C6EF-8D65-4919-A306-F150483D8753_see|text=|trigger=button}{sub-section}{sub-section:2F66C6EF-8D65-4919-A306-F150483D8753_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2F66C6EF-8D65-4919-A306-F150483D8753_see|text=|trigger=button}{sub-section}{sub-section:2F66C6EF-8D65-4919-A306-F150483D8753_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2F66C6EF-8D65-4919-A306-F150483D8753_sam|text=|trigger=button}{sub-section}{sub-section:2F66C6EF-8D65-4919-A306-F150483D8753_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=229431D4-DF9A-4BB5-BAC5-4943A1B76783}{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:229431D4-DF9A-4BB5-BAC5-4943A1B76783_des|text=|trigger=button}{sub-section}{sub-section:229431D4-DF9A-4BB5-BAC5-4943A1B76783_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:229431D4-DF9A-4BB5-BAC5-4943A1B76783_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:229431D4-DF9A-4BB5-BAC5-4943A1B76783_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:229431D4-DF9A-4BB5-BAC5-4943A1B76783_ret|text=|trigger=button}{sub-section}{sub-section:229431D4-DF9A-4BB5-BAC5-4943A1B76783_ret|trigger=none|class=sIndent}[Date]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:229431D4-DF9A-4BB5-BAC5-4943A1B76783_see|text=|trigger=button}{sub-section}{sub-section:229431D4-DF9A-4BB5-BAC5-4943A1B76783_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:229431D4-DF9A-4BB5-BAC5-4943A1B76783_see|text=|trigger=button}{sub-section}{sub-section:229431D4-DF9A-4BB5-BAC5-4943A1B76783_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:229431D4-DF9A-4BB5-BAC5-4943A1B76783_sam|text=|trigger=button}{sub-section}{sub-section:229431D4-DF9A-4BB5-BAC5-4943A1B76783_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=8FCE9EB7-DF79-4B53-9A61-01DBE0EC47CE}{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:8FCE9EB7-DF79-4B53-9A61-01DBE0EC47CE_des|text=|trigger=button}{sub-section}{sub-section:8FCE9EB7-DF79-4B53-9A61-01DBE0EC47CE_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:8FCE9EB7-DF79-4B53-9A61-01DBE0EC47CE_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8FCE9EB7-DF79-4B53-9A61-01DBE0EC47CE_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:8FCE9EB7-DF79-4B53-9A61-01DBE0EC47CE_ret|text=|trigger=button}{sub-section}{sub-section:8FCE9EB7-DF79-4B53-9A61-01DBE0EC47CE_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8FCE9EB7-DF79-4B53-9A61-01DBE0EC47CE_see|text=|trigger=button}{sub-section}{sub-section:8FCE9EB7-DF79-4B53-9A61-01DBE0EC47CE_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8FCE9EB7-DF79-4B53-9A61-01DBE0EC47CE_see|text=|trigger=button}{sub-section}{sub-section:8FCE9EB7-DF79-4B53-9A61-01DBE0EC47CE_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8FCE9EB7-DF79-4B53-9A61-01DBE0EC47CE_sam|text=|trigger=button}{sub-section}{sub-section:8FCE9EB7-DF79-4B53-9A61-01DBE0EC47CE_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=699E4843-9DD2-42D7-B715-F0C8F272C1EB}{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:699E4843-9DD2-42D7-B715-F0C8F272C1EB_des|text=|trigger=button}{sub-section}{sub-section:699E4843-9DD2-42D7-B715-F0C8F272C1EB_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:699E4843-9DD2-42D7-B715-F0C8F272C1EB_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:699E4843-9DD2-42D7-B715-F0C8F272C1EB_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:699E4843-9DD2-42D7-B715-F0C8F272C1EB_ret|text=|trigger=button}{sub-section}{sub-section:699E4843-9DD2-42D7-B715-F0C8F272C1EB_ret|trigger=none|class=sIndent}[JSFile]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:699E4843-9DD2-42D7-B715-F0C8F272C1EB_see|text=|trigger=button}{sub-section}{sub-section:699E4843-9DD2-42D7-B715-F0C8F272C1EB_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:699E4843-9DD2-42D7-B715-F0C8F272C1EB_see|text=|trigger=button}{sub-section}{sub-section:699E4843-9DD2-42D7-B715-F0C8F272C1EB_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:699E4843-9DD2-42D7-B715-F0C8F272C1EB_sam|text=|trigger=button}{sub-section}{sub-section:699E4843-9DD2-42D7-B715-F0C8F272C1EB_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=03E91059-5306-4393-967D-0DC417DE94DD}{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:03E91059-5306-4393-967D-0DC417DE94DD_des|text=|trigger=button}{sub-section}{sub-section:03E91059-5306-4393-967D-0DC417DE94DD_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:03E91059-5306-4393-967D-0DC417DE94DD_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:03E91059-5306-4393-967D-0DC417DE94DD_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:03E91059-5306-4393-967D-0DC417DE94DD_ret|text=|trigger=button}{sub-section}{sub-section:03E91059-5306-4393-967D-0DC417DE94DD_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:03E91059-5306-4393-967D-0DC417DE94DD_see|text=|trigger=button}{sub-section}{sub-section:03E91059-5306-4393-967D-0DC417DE94DD_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:03E91059-5306-4393-967D-0DC417DE94DD_see|text=|trigger=button}{sub-section}{sub-section:03E91059-5306-4393-967D-0DC417DE94DD_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:03E91059-5306-4393-967D-0DC417DE94DD_sam|text=|trigger=button}{sub-section}{sub-section:03E91059-5306-4393-967D-0DC417DE94DD_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=6E69597B-1986-41EB-BA2F-2326DE0A887A}{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:6E69597B-1986-41EB-BA2F-2326DE0A887A_des|text=|trigger=button}{sub-section}{sub-section:6E69597B-1986-41EB-BA2F-2326DE0A887A_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:6E69597B-1986-41EB-BA2F-2326DE0A887A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:6E69597B-1986-41EB-BA2F-2326DE0A887A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:6E69597B-1986-41EB-BA2F-2326DE0A887A_ret|text=|trigger=button}{sub-section}{sub-section:6E69597B-1986-41EB-BA2F-2326DE0A887A_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:6E69597B-1986-41EB-BA2F-2326DE0A887A_see|text=|trigger=button}{sub-section}{sub-section:6E69597B-1986-41EB-BA2F-2326DE0A887A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:6E69597B-1986-41EB-BA2F-2326DE0A887A_see|text=|trigger=button}{sub-section}{sub-section:6E69597B-1986-41EB-BA2F-2326DE0A887A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:6E69597B-1986-41EB-BA2F-2326DE0A887A_sam|text=|trigger=button}{sub-section}{sub-section:6E69597B-1986-41EB-BA2F-2326DE0A887A_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=5F2644FA-C853-43B2-B6B5-4F7B69D99387}{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:5F2644FA-C853-43B2-B6B5-4F7B69D99387_des|text=|trigger=button}{sub-section}{sub-section:5F2644FA-C853-43B2-B6B5-4F7B69D99387_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:5F2644FA-C853-43B2-B6B5-4F7B69D99387_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5F2644FA-C853-43B2-B6B5-4F7B69D99387_prs|trigger=none}destination
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:5F2644FA-C853-43B2-B6B5-4F7B69D99387_ret|text=|trigger=button}{sub-section}{sub-section:5F2644FA-C853-43B2-B6B5-4F7B69D99387_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5F2644FA-C853-43B2-B6B5-4F7B69D99387_see|text=|trigger=button}{sub-section}{sub-section:5F2644FA-C853-43B2-B6B5-4F7B69D99387_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5F2644FA-C853-43B2-B6B5-4F7B69D99387_see|text=|trigger=button}{sub-section}{sub-section:5F2644FA-C853-43B2-B6B5-4F7B69D99387_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5F2644FA-C853-43B2-B6B5-4F7B69D99387_sam|text=|trigger=button}{sub-section}{sub-section:5F2644FA-C853-43B2-B6B5-4F7B69D99387_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=82F70A4F-7DB2-4C41-AEF3-BEC9BAC6DFD5}{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:82F70A4F-7DB2-4C41-AEF3-BEC9BAC6DFD5_des|text=|trigger=button}{sub-section}{sub-section:82F70A4F-7DB2-4C41-AEF3-BEC9BAC6DFD5_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:82F70A4F-7DB2-4C41-AEF3-BEC9BAC6DFD5_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:82F70A4F-7DB2-4C41-AEF3-BEC9BAC6DFD5_prs|trigger=none}date
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:82F70A4F-7DB2-4C41-AEF3-BEC9BAC6DFD5_ret|text=|trigger=button}{sub-section}{sub-section:82F70A4F-7DB2-4C41-AEF3-BEC9BAC6DFD5_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:82F70A4F-7DB2-4C41-AEF3-BEC9BAC6DFD5_see|text=|trigger=button}{sub-section}{sub-section:82F70A4F-7DB2-4C41-AEF3-BEC9BAC6DFD5_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:82F70A4F-7DB2-4C41-AEF3-BEC9BAC6DFD5_see|text=|trigger=button}{sub-section}{sub-section:82F70A4F-7DB2-4C41-AEF3-BEC9BAC6DFD5_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:82F70A4F-7DB2-4C41-AEF3-BEC9BAC6DFD5_sam|text=|trigger=button}{sub-section}{sub-section:82F70A4F-7DB2-4C41-AEF3-BEC9BAC6DFD5_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=12C2F2AE-8419-490B-9074-F3886D11CC68}{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:12C2F2AE-8419-490B-9074-F3886D11CC68_des|text=|trigger=button}{sub-section}{sub-section:12C2F2AE-8419-490B-9074-F3886D11CC68_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:12C2F2AE-8419-490B-9074-F3886D11CC68_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:12C2F2AE-8419-490B-9074-F3886D11CC68_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:12C2F2AE-8419-490B-9074-F3886D11CC68_ret|text=|trigger=button}{sub-section}{sub-section:12C2F2AE-8419-490B-9074-F3886D11CC68_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:12C2F2AE-8419-490B-9074-F3886D11CC68_see|text=|trigger=button}{sub-section}{sub-section:12C2F2AE-8419-490B-9074-F3886D11CC68_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:12C2F2AE-8419-490B-9074-F3886D11CC68_see|text=|trigger=button}{sub-section}{sub-section:12C2F2AE-8419-490B-9074-F3886D11CC68_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:12C2F2AE-8419-490B-9074-F3886D11CC68_sam|text=|trigger=button}{sub-section}{sub-section:12C2F2AE-8419-490B-9074-F3886D11CC68_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=1D3F2A4C-3EC2-44D6-80D8-5160DCB216E7}{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:1D3F2A4C-3EC2-44D6-80D8-5160DCB216E7_des|text=|trigger=button}{sub-section}{sub-section:1D3F2A4C-3EC2-44D6-80D8-5160DCB216E7_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:1D3F2A4C-3EC2-44D6-80D8-5160DCB216E7_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1D3F2A4C-3EC2-44D6-80D8-5160DCB216E7_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:1D3F2A4C-3EC2-44D6-80D8-5160DCB216E7_ret|text=|trigger=button}{sub-section}{sub-section:1D3F2A4C-3EC2-44D6-80D8-5160DCB216E7_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1D3F2A4C-3EC2-44D6-80D8-5160DCB216E7_see|text=|trigger=button}{sub-section}{sub-section:1D3F2A4C-3EC2-44D6-80D8-5160DCB216E7_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1D3F2A4C-3EC2-44D6-80D8-5160DCB216E7_see|text=|trigger=button}{sub-section}{sub-section:1D3F2A4C-3EC2-44D6-80D8-5160DCB216E7_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1D3F2A4C-3EC2-44D6-80D8-5160DCB216E7_sam|text=|trigger=button}{sub-section}{sub-section:1D3F2A4C-3EC2-44D6-80D8-5160DCB216E7_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}