# 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 sub-directories. 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` method 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.

NamedFifo

The `NameFifo` class is a string vector designed to operate as a stream fifo object. The class provides the facility to read or write the fifo content from a stream. The stream can be created by name for writing, in which case the named fifo operates as a backup object.

named-fifo-p
Strvec
Nameable
NamedFifo
none

The `NamedFifo` constructor creates a default named fifo without a backing name. In this case the fifo cannot be read or written by stream.

NamedFifo
String

The `NamedFifo` constructor creates a named fifo by name. The name is used as a file name for reading or writing the fifo.

NamedFifo
String Boolean

The `NamedFifo` constructor creates a named fifo by name. The name is used as a file name for reading or writing the fifo.If the boolean argument is true, the fifo is read.

read
none
none

The `read` method reads the fifo file name and fill the fifo.

write
none
none

The `write` method writes the fifo contents to the fifo file name.

set-name
none
String

The `set-name` method sets the fifo file name.

FileInfo

The `FileInfo` is a file information class that holds the primary information related to a file, such like its size or its modification time. The file information is set at construction but can be updated with the help of the `update` method.

file-info-p
Nameable
String

The `FileInfo` constructor creates a file information by name. The string argument is the file name to query.

length
Integer
none

The `length` method returns the file size information.

get-modification-time
Integer
none

The `get-modification-time` method returns the file modification time. The time can be used as an argument to the `Time` or `Date` object.

update
none
none

The `update` method the file information data.