A SERVICE OF

logo

28 Chapter 3
isDirectory()
Returns true if the File object points to a directory, otherwise returns false.
Syntax
<object name>.isDirectory();
Parameters
This function takes no parameters.
isFile()
Returns true if the File object points to a regular file, otherwise returns false.
Syntax
<object name>.isFile();
Parameters
This function takes no parameters.
length()
Returns an integer containing the number of text lines in the file.
Syntax
<object name>.length();
Parameters
This function takes no parameters.
list()
Returns an array of File objects representing the directory entries for the named File object.
If the named File object does not represent a directory (or that directory is empty), then
list() returns an empty array.
Syntax
<object name>.list();
Parameters
This function takes no parameters.
mkdir()
Creates the directory (and any non-existent parent directories) specified by the current File
object.
Syntax
<object name>.mkdir();
Parameters
This function takes no parameters.