Type io:File

A File represents a handle on a filesystem resource, such as a file, symbolic link or directory.
Constructors:
io:File(Node filename)
Create a new filesystem resource handle.
Parameter filename: The string value of filename will be used as filename.
io:File(Node parent, Node filename)
Create a new filesystem resource handle.
Parameter parent: The parent directory.
Parameter filename: The filename.
io:File(io:File parent, Node filename)
Create a new filesystem resource handle.
Parameter parent: The parent directory.
Parameter filename: The filename.
io:File(jio:File file)
Functions:
absolute()
Get the absolute path of the filesystem resource.
Returns: The absolute path as a String.
copy(io:File destination)
Copy the resource represented by this File to another filesystem location, overwriting the destination if it already exists.
date()
Get the timestamp associated with this io:File.
Returns: Returns a time:Date representing the last modified date of this io:File
directory()
Determine if this file represents a filesystem directory.
Returns: Boolean true if this File is a directory.
exists()
Determine if the resource represented by this File exists on the filesystem.
Returns: Boolean true if this File exists.
file()
list()
List the contents of this directory.
Returns: A nodeset of Files representing the resources contained in this directory, or an empty nodeset if none.
list(Node pattern)
List the contents of this directory that match a particular pattern.
Parameter pattern: A glob-style pattern.
Returns: A nodeset of Files representing the resources contained in this directory matching pattern, or an empty nodeset if none.
mkdir()
Create the directory represented by this File, and/or any other directories in the path that do not already exist.
move(io:File destination)
Move the resource represented by this File to another filesystem location, overwriting the destination if it already exists.
name()
Get the name of the filesystem resource.
Returns: The filename as a String.
parent()
Return the (absolute) parent of this io:File.
Returns: The parent io:File, or an empty nodeset if this io:File has no parent.
parse()
Parse the XML contents of the file.
Returns: The contents of the file as XML nodes.
path()
Get the path of the filesystem resource.
Returns: The path as a String.
read()
Read the file.
Returns: The file contents as a String.
remove()
Remove the resource represented by this File from the filesystem.
size()
string()
url()
Get a URL representation of this file
Returns: A String representing this file as a URL
write(Node data)
Write to the file.
Parameter data: The XML nodes to serialise.
write(String data)
Write to the file.
Parameter data: The string data to write.