# Standard i/o reference

This appendix is a reference of the standard i/o module.

## Standard i/o module

Symbol | Description
--- | ---
afnix-sio | module
afnix:sio | nameset

dir-p Boolean String

The `dir-p` function returns true if the argument name is a directory name, false otherwise.

file-p Boolean String

The `file-p` function returns true if the argument name is a regular file name, false otherwise.

tmp-name String String?

The `tmp-name` function returns a name suitable for the use as a temporary file name. Without argument, a default prefix is used to build the name. An optional string prefix can control the original name.

tmp-path String String?

The `tmp-path` function returns a path suitable for the use as a temporary file name. Without argument, a default prefix is used to build the path. An optional string prefix can control the original name.

absolute-path String String+

The `absolute-path` function returns an absolute path name from an argument list. Without argument, the command returns the root directory name. With one or several argument, the absolute path is computed from the root directory.

relative-path String String+

The `relative-path` function returns a relative path name from an argument list. With one argument, the function returns it. With two or more arguments, the relative path is computed by joining each argument with the previous one.

rmfile none String+

The `rmfile` function removes one or several files specified as the arguments. If one file fails to be removed, an exception is raised.

mkdir none String+

The `mkdir` function creates one or several directories specified as the arguments. If one directory fails to be created, an exception is raised.

mhdir none String+

The `mhdir` function creates hierarchicaly one or several directories specified as the arguments. If one directory fails to be created, an exception is raised.

rmdir none String+

The `rmdir` function removes one or several directories specified as the arguments. If one directory fails to be removed, an exception is raised.

get-base-name String String

The `get-base-name` function returns the base name from a path. The base name can be either a file name or a directory name. By definition, a path is made of a base path and a base name.

get-base-path String String

The `get-base-path` function returns the base path from a path. The base path is a directory name. By definition, a path is made of a base path and a base name.

get-extension String String

The `get-extension` function returns the extension from a path.

remove-extension String String

The `remove-extension` function returns the extension from a path. In order to get a base file name from a path, the `get-base-name` function must be called first.