# Special i/o objects reference

Directory

The `Directory` class provides some facilities to access a directory. By default, a directory object is constructed to represent the current directory. With one argument, the object is constructed from the directory name. Once the object is constructed, it is possible to retrieve its content.

directory-p
Object
Directory
none

The `Directory` constructor creates a directory object those location is the current directory. If the directory cannot be opened, an exception is raised.

Directory
String

The `Directory` constructor create a directory object by name. If the directory cannot be opened, an exception is raised. The first argument is the directory name to open.

mkdir
Directory
String

The `mkdir` method creates a new directory in the current one. The full path is constructed by taking the directory name and adding the argument. Once the directory is created, the method returns a directory object of the newly constructed directory. An exception is thrown if the directory cannot be created.

rmdir
none
String

The `rmdir` method removes an empty directory. The full path is constructed by taking the directory name and adding the argument. An exception is thrown if the directory cannot be removed.

rmfile
none
String

The `rmfile` method removes a file in the current directory. The full path is constructed by taking the directory name and adding the argument. An exception is thrown if the file cannot be removed.

get-name
String
none

The `get-name` method returns the directory name. If the default directory was created, the method returns the full directory path.

get-list
List
none

The `get-list` method returns the directory contents. The method returns a list of strings. The list contains all valid names at the time of the call, including the current directory and the parent directory.

get-files
List
none

The `get-files` method returns the directory contents. The method returns a list of strings of files. The list contains all valid names at the time of the call.

get-subdirs
List
none

The `get-subdirs` method returns the sub directories. The method returns a list of strings of subdirectories. The list contains all valid names at the time of the call, including the current directory and the parent directory.

next-name
String
none

The `next-name` method returns the next available name from the directory stream. This method is useful when operating with a large number of elements.

next-path
String
none

The `next-path` method returns the next available path name from the directory stream. This method is useful when operating with a large number of elements.

next-file-name
String
none

The `next-file-name` method returns the next available file name from the directory stream. This method is useful when operating with a large number of elements.

next-file-path
String
none

The `next-file-path` method returns the next available file path name from the directory stream. This method is useful when operating with a large number of elements.

next-dir-name
String
none

The `next-dir-name` method returns the next available directory name from the directory stream. This method is useful when operating with a large number of elements.

next-dir-path
String
none

The `next-dir-path` method returns the next available directory path name from the directory stream. This method is useful when operating with a large number of elements.

Logtee

The `Logtee` class is a message logger facility associated with an output stream. When a message is added to the logger object, the message is also sent to the output stream, depending on the controlling flags. The name "logtee" comes from the contraction of "logger" and "tee". One particularity of the class is that without a stream, the class behaves like a regular logger.

logtee-p
Logger
Logtee
none

The `Logtee` constructor creates a default logger without an output stream

Logtee
Integer

The `Logtee` constructor creates a logger object with a specific size without an output stream.

Logtee
Output

The `Logtee` constructor creates a logger object with an output stream.

Logtee
Integer Output

The `Logtee` constructor creates a logger object with a specific size and an output stream. The first argument is the logger window size. The second argument is the output stream.

Logtee
Integer String Output

The `Logtee` constructor creates a logger object with a specific size, an information string and an output stream. The first argument is the logger window size. The second argument is the logger information string. The third argument is the output stream.

set-output-stream
none
Output

The `set-output-stream` method attaches the output stream to the logtee object.

get-output-stream
Output
none

The `get-output-stream` returns the logtee output stream.

set-tee
none
Boolean

The `set-tee` method sets the logtee control flag. The control flag controls the message display to the output stream.

get-tee
Boolean
none

The `get-tee` method returns the logtee output stream.