File

File class supplies processes about a file.

File.exec(cmd)

Executes the file of cmd. If it begins in "http://", "https://", etc., a default browser lanuches. And if it begins in "mailto:", a default mailer lanuches.

File.readAllText(path)

Loads all the texts from a file and returns as a string type. The text data which can be loaded is Unicode or utf-8.

File.writeAllText(path, string)

Saves a string type text to the file. Format is utf-8.

File.getDrive(path)

Gets a drive name. For example, if path is "C:\dir\file.txt", it returns "C:\".

File.getDirectoryName(path)

Gets a folder name. For example, if path is "C:\dir\file.txt", it returns "C:\dir".

File.getFileName(path)

Gets the file name except an extension. For example, if path is "C:\dir\file.txt", it returns "file".

File.getExtension(path)

Gets an extension. For example, if path is "C:\dir\file.txt", it returns ".txt".

File.toAbsolutePath(path)

Converts and returns to the absolute path from a current database file.

File.toRelativePath(path)

Converts and returns to the relative path from a current database file.