Extended Unix functionality.
Various unit utility routines.
Basic unix functionality.
Basic unix types.
C type: 8 bits sized, signed integer.
C type: 8 bits sized, unsigned integer.
C type: 16 bits sized, unsigned integer.
C type: 16 bits sized, signed integer.
C type: 32 bits sized, signed integer.
C type: 32 bits sized, unsigned integer.
C type: 64 bits sized, signed integer.
C type: 64 bits sized, unsigned integer.
C type: unsigned character
C type: integer (natural size)
C type: unsigned integer (natural size)
C type: long signed integer (double sized)
C type: long unsigned integer (double sized)
C type: short signed integer (half sized)
C type: short unsigned integer (half sized)
Pointer to type.
Pointer to type.
Pointer to type.
Pointer to type.
Pointer to type.
Pointer to type.
Device descriptor type.
Alias for type.
Pointer to type.
Group ID type.
Alias for type.
Pointer to type.
Inode type.
Alias for type.
Pointer to type.
Inode mode type.
Alias for type.
Pointer to type.
Number of links type.
Alias for type.
Pointer to type.
Offset type.
Alias for type.
Pointer to type.
Process ID type.
Alias for type.
Pointer to type.
Size specification type.
Alias for type
Pointer to type.
Small size type.
Alias for type
Pointer to type
User ID type
Alias for type.
Pointer to type.
Clock ticks type
Alias for type.
Pointer to type.
Time span type
Alias for type.
Pointer to type.
Pointer to type.
Socket address length type.
Alias for type.
Pointer to type.
Time specification type.
Pointer to type.
Alias for type.
Short time specification type.
Pointer to type.
Alias for type.
Thread mutex type.
Thread conditional variable type.
Posix thread type.
Maximum number of arguments to a program.
Maximum filename length.
Maximum pathname length.
Max system name length.
Maximum system signal number.
option: Get process priority.
option: Get process group priority.
option: Get user priority.
Seek option: Set absolute position.
Seek option: Set position relative to current position.
Seek option: Set position relative to end of file.
Bitmask to determine access mode in open flags.
File open mode: Read only
File open mode: Write only
File open mode: Read/Write
File open mode: Create if file does not yet exist.
File open mode: Open exclusively
File open mode: No TTY control.
File open mode: Truncate file to length 0
File open mode: Append to file
File open mode: Open in non-blocking mode
File open mode: Alias for
File open mode: Write to disc at once
File open mode: Minimize caching effects
File open mode: Open for 64-bit I/O
File open mode: File must be directory.
File open mode: Fail if file is symbolic link.
: Do not wait
: Also report stopped but untraced processes
: Wait on any process
: Wait processes from current process group
: Wait on clone processes only.
File ( record) mode: File type bit mask
File ( record) mode: Socket
File ( record) mode: Link
File ( record) mode: Regular file
File ( record) mode: Block device
File ( record) mode: Directory
File ( record) mode: Character device
File ( record) mode: FIFO
File ( record) mode: UID bit set
File ( record) mode: GID bit set
File ( record) mode: Sticky bit set
File ( record) mode: Other permission bits mask
File ( record) mode: Other read permission
File ( record) mode: Other write permission
File ( record) mode: Others execute permission
File ( record) mode: Group permission bits mask
File ( record) mode: Group read permission
File ( record) mode: Group write permission
File ( record) mode: Others execute permission
File ( record) mode: Owner permission bits mask
File ( record) mode: Owner read permission
File ( record) mode: Owner write permission
File ( record) mode: Others execute permission
File system type (): (ext2) Old second extended
File system type (): (ext2) Second extended
File system type (): (ext) Extended
File system type (): ISO 9660
File system type (): Minix
File system type (): Minix 3.0
File system type (): Minix V2
File system type (): MSDOS (FAT)
File system type (): NFS
File system type (): PROC fs
File system type (): XIA
IOCTL call number: get Terminal Control settings
Sigaction options: Do not receive notification when child processes stop
Sigaction options: ?
Sigaction options: The signal handler takes 3 arguments, not one.
Sigaction options: ?
Sigaction options: Call the signal handler on an alternate signal stack.
Sigaction options: Provide behaviour compatible with BSD signal semantics
Sigaction options: ?
Sigaction options: Do not prevent the signal from being received when it is handled.
Sigaction options: Restore the signal action to the default state.
Sigprocmask flags: Add signals to the set of blocked signals.
Sigprocmask flags: Remove signals from the set set of blocked signals.
Sigprocmask flags: Set of blocked signals is given.
Signal handler: Default signal handler
Signal handler: Ignore signal
Signal handler: error
Signal: HUP (Hangup)
Signal: INT (Interrupt)
Signal: QUIT
Signal: ILL (Illegal instruction)
Signal: TRAP (Trace trap)
Signal: ABRT (Abort)
Signal: IOT (IOT trap)
Signal: BUS (bus error)
Signal: FPE (Floating point error)
Signal: KILL (unblockable)
Signal: USR1 (User-defined signal 1)
Signal: SEGV (Segmentation violation)
Signal: USR2 (User-defined signal 2)
Signal: PIPE (Broken pipe
Signal: ALRM (Alarm clock)
Signal: TERM (Terminate)
Signal: STKFLT (Stack Fault)
Signal: CHLD (child status changed)
Signal: CONT (Continue)
Signal: STOP (Stop, unblockable)
Signal: TSTP (keyboard stop)
Signal: TTIN (Terminal input, background)
Signal: TTOU (Terminal output, background)
Signal: URG (Socket urgent condition)
Signal: XCPU (CPU limit exceeded)
Signal: XFSZ (File size limit exceeded)
Signal: VTALRM (Virtual alarm clock)
Signal: PROF (Profiling alarm)
Signal: WINCH (Window/Terminal size change)
Signal: IO (I/O operation possible)
Signal: POLL (Pollable event)
Signal: PWR (power failure restart)
Signal: Unused
Signal information pad size.
Record describing floating point register in signal handler.
Decimal part of floating point value
Exponent of floating point value
Pointer to record.
Record describing floating point unit in signal handler.
Signal set type
Signal set type
Pointer to type.
Pointer to type.
Alias for type.
Pointer to record type.
Record containing signal information.
Signal number.
?
?
Simple signal handler prototype
Pointer to type.
Signal restorer function prototype
Pointer to type
Extended signal handler prototype.
Record used in call.
Funcion called when signal is triggered.
Signal mask.
Flags for SigAction
Obsolete, don't use
Alias for record type.
Pointer to record type.
Record describing a timezone
Minutes west of GMT
Daylight savings time
Pointer to record.
Alias for record.
File ( record) mode: File type bit mask
File ( record) mode: Socket
File ( record) mode: Link
File ( record) mode: Regular file
File ( record) mode: Block device
File ( record) mode: Directory
File ( record) mode: Character device
File ( record) mode: FIFO
Input file descriptor of pipe pair.
Output file descriptor of pipe pair.
Shared lock
Exclusive lock
unlock
Non-blocking operation
Pointer to record.
Record containing one entry in the result of
Filename matching the search criteria
Next element in result of Glob call.
Array describing a pipe pair of filedescriptors.
Indicates whether daylight savings time is active.
Timezone name.
Describes the search strategy used by
Do not search the current directory unless it is specified in the search path.
Search the current directory first, before all directories in the search path.
Search the current directory last, after all directories in the search path
Return local timzeone information

GetLocalTimeZone returns the local timezone information. It also initializes the TZSeconds variable, which is used to correct the epoch time to local time.

There should never be any need to call this function directly. It is called by the initialization routines of the Linux unit.

Read the timezone file and initialize time routines

ReadTimeZoneFile reads the timezone file fn and initializes the local time routines based on the information found there.

There should be no need to call this function. The initialization routines of the linux unit call this routine at unit startup.

None.
Return name of timezone information file

GetTimezoneFile returns the location of the current timezone file. The location of file is determined as follows:

1. If /etc/timezone exists, it is read, and the contents of this file is returned. This should work on Debian systems.
2. If /usr/lib/zoneinfo/localtime exists, then it is returned. (this file is a symlink to the timezone file on SuSE systems)
3. If /etc/localtime exists, then it is returned. (this file is a symlink to the timezone file on RedHat systems)

If no file was found, an empty string is returned.
Return the current unix time

returns the number of seconds since 00:00:00 gmt, january 1, 1970. it is adjusted to the local time zone, but not to DST.

no errors
Return current system time

Returns the current time of the day, adjusted to local time. Upon return, the parameters are filled with

hour
  Hours since 00:00 today.
min
  minutes in current hour.
sec
  seconds in current minute.
sec100
  hundreds of seconds in current second.
msec
  milliseconds in current second.
usec
  microseconds in current second.

None
Return the system date

Returns the current date. On return, the parameters are filled with

year
  Year (4 digits).
month
  Month of the year.
day
  Day of the month.

None
Return system date and time
Returns the current date and time. The time is corrected for the local time zone. This procedure is equivalent to the and GetTime calls.
None
Set the current system time.

SetTime sets the system time to hour, min, Sec. This is the kernel time, so it is in GMT. The date is not touched. The function returns True if the call was executed corretly, False otherwise.

You must be root to execute this call.
Extended error information can be retrieved with FpGetErrno
Set the current system date.

SetDate sets the system date to year, month, day. This is the kernel date, so it is in GMT. The time is not touched. The function returns True if the call was executed corretly, False otherwise.

You must be root to execute this call.
Extended error information can be retrieved with FpGetErrno
Set the current system date and time

SetDate sets the system date and time to year, month, day, hour, min, Sec. This is the kernel date/time, so it is in GMT. The time is not touched. The function returns True if the call was executed corretly, False otherwise.

You must be root to execute this call.
Extended error information can be retrieved with FpGetErrno
Create an array of null-terminated strings

CreateShellArgV creates an array of 3 PChar pointers that can be used as arguments to ExecVE the first elements in the array will contain /bin/sh, the second will contain -c, and the third will contain prog.

The function returns a pointer to this array, of type PPChar.

The memory allocated for the array can be disposed of with the function.

None.
Frees the memory allocated by the call.

FreeShellArgV frees the memory which was allocated by the call.

Do not attempt to free memory with this call which was allocated by some C or other library, this will lead to memory corruption.

None.
Execute process
Execv
replaces the currently running program with the program, specified in path. It gives the program the options in args. This is a pointer to an array of pointers to null-terminated strings. The last pointer in this array should be nil. The current environment is passed to the program. On success, execv does not return.

Extended error information is returned by the FpGetErrno function:

sys_eacces
  File is not a regular file, or has no execute permission. A compononent of the path has no search permission.
sys_eperm
  The file system is mounted noexec.
sys_e2big
  Argument list too big.
sys_enoexec
  The magic number in the file is incorrect.
sys_enoent
  The file does not exist.
sys_enomem
  Not enough memory for kernel.
sys_enotdir
  A component of the path is not a directory.
sys_eloop
  The path contains a circular reference (via symlinks).

FpExecve FpFork
Execute process, search path

Execvp replaces the currently running program with the program, specified in path. The executable in path is searched in the contents of the PATH environment variable, if it isn't an absolute filename.

It gives the program the options in args. This is a pointer to an array of pointers to null-terminated strings. The last pointer in this array should be nil. The current environment is passed to the program. On success, execvp does not return.

Extended error information is returned by the FpGetErrno function:

sys_eacces
  File is not a regular file, or has no execute permission. A compononent of the path has no search permission.
sys_eperm
  The file system is mounted noexec.
sys_e2big
  Argument list too big.
sys_enoexec
  The magic number in the file is incorrect.
sys_enoent
  The file does not exist.
sys_enomem
  Not enough memory for kernel.
sys_enotdir
  A component of the path is not a directory.
sys_eloop
  The path contains a circular reference (via symlinks).

FpExecve FpFork
Execute process (using argument list)
Execl
replaces the currently running program with the program, specified in Todo. Todo is split into a command and it's options. The executable in Todo is NOT searched in the path. The current environment is passed to the program. On success, execl does not return.

Extended error information is returned by the FpGetErrno function:

sys_eacces
  File is not a regular file, or has no execute permission. A compononent of the path has no search permission.
sys_eperm
  The file system is mounted noexec.
sys_e2big
  Argument list too big.
sys_enoexec
  The magic number in the file is incorrect.
sys_enoent
  The file does not exist.
sys_enomem
  Not enough memory for kernel, or to split command line.
sys_enotdir
  A component of the path is not a directory.
sys_eloop
  The path contains a circular reference (via symlinks).

FpExecve FpFork
Execute process (using argument list, environment)

Execle replaces the currently running program with the program, specified in Todo. Todo is split into a command and it's options. The executable in Todo is searched in the path, if it isn't an absolute filename. The environment in ep is passed to the program. On success, execle does not return.

Extended error information is returned by the FpGetErrno function:

sys_eacces
  File is not a regular file, or has no execute permission. A compononent of the path has no search permission.
sys_eperm
  The file system is mounted noexec.
sys_e2big
  Argument list too big.
sys_enoexec
  The magic number in the file is incorrect.
sys_enoent
  The file does not exist.
sys_enomem
  Not enough memory for kernel, or to split command line.
sys_enotdir
  A component of the path is not a directory.
sys_eloop
  The path contains a circular reference (via symlinks).

FpExecve FpFork
Execute process (using argument list, environment; search path)
Execlp
replaces the currently running program with the program, specified in path. Path is split into a command and it's options. The executable in path is searched in the path, if it isn't an absolute filename. The current environment is passed to the program. On success, execlp does not return.

Extended error information is returned by the FpGetErrno function:

sys_eacces
  File is not a regular file, or has no execute permission. A compononent of the path has no search permission.
sys_eperm
  The file system is mounted noexec.
sys_e2big
  Argument list too big.
sys_enoexec
  The magic number in the file is incorrect.
sys_enoent
  The file does not exist.
sys_enomem
  Not enough memory for kernel, or to split command line.
sys_enotdir
  A component of the path is not a directory.
sys_eloop
  The path contains a circular reference (via symlinks).

FpExecve FpFork
Execute process (using argument list, environment)

FpExecLE replaces the currently running program with the program, specified in PathName. S is an array of command options. The executable in PathName must be an absolute pathname. The environment in MyEnv is passed to the program. On success, FpExecLE does not return.

Extended error information is returned by the FpGetErrno function:

sys_eacces
  File is not a regular file, or has no execute permission. A compononent of the path has no search permission.
sys_eperm
  The file system is mounted noexec.
sys_e2big
  Argument list too big.
sys_enoexec
  The magic number in the file is incorrect.
sys_enoent
  The file does not exist.
sys_enomem
  Not enough memory for kernel, or to split command line.
sys_enotdir
  A component of the path is not a directory.
sys_eloop
  The path contains a circular reference (via symlinks).

FpExecve FpFork
Execute process (using argument list, environment)

FpExecL replaces the currently running program with the program, specified in PathName. S is an array of command options. The executable in PathName must be an absolute pathname. The current process' environment is passed to the program. On success, FpExecL does not return.

Extended error information is returned by the FpGetErrno function:

sys_eacces
  File is not a regular file, or has no execute permission. A compononent of the path has no search permission.
sys_eperm
  The file system is mounted noexec.
sys_e2big
  Argument list too big.
sys_enoexec
  The magic number in the file is incorrect.
sys_enoent
  The file does not exist.
sys_enomem
  Not enough memory for kernel, or to split command line.
sys_enotdir
  A component of the path is not a directory.
sys_eloop
  The path contains a circular reference (via symlinks).

FpExecve FpFork
Execute process (using argument list, environment; search path)
FpExecLP
replaces the currently running program with the program, specified in PathName. S is an array of command options. The executable in PathName is searched in the path, if it isn't an absolute filename. The current environment is passed to the program. On success, FpExecLP does not return.

Extended error information is returned by the FpGetErrno function:

sys_eacces
  File is not a regular file, or has no execute permission. A compononent of the path has no search permission.
sys_eperm
  The file system is mounted noexec.
sys_e2big
  Argument list too big.
sys_enoexec
  The magic number in the file is incorrect.
sys_enoent
  The file does not exist.
sys_enomem
  Not enough memory for kernel, or to split command line.
sys_enotdir
  A component of the path is not a directory.
sys_eloop
  The path contains a circular reference (via symlinks).

FpExecve FpFork
Execute process
FpExecV
replaces the currently running program with the program, specified in PathName. It gives the program the options in args. This is a pointer to an array of pointers to null-terminated strings. The last pointer in this array should be nil. The current environment is passed to the program. On success, FpExecV does not return.

Extended error information is returned by the FpGetErrno function:

sys_eacces
  File is not a regular file, or has no execute permission. A compononent of the path has no search permission.
sys_eperm
  The file system is mounted noexec.
sys_e2big
  Argument list too big.
sys_enoexec
  The magic number in the file is incorrect.
sys_enoent
  The file does not exist.
sys_enomem
  Not enough memory for kernel.
sys_enotdir
  A component of the path is not a directory.
sys_eloop
  The path contains a circular reference (via symlinks).

FpExecve FpFork
Execute process, search path
FpExecVP
replaces the currently running program with the program, specified in PathName. The executable in path is searched in the path, if it isn't an absolute filename. It gives the program the options in args. This is a pointer to an array of pointers to null-terminated strings. The last pointer in this array should be nil. The current environment is passed to the program. On success, execvp does not return.

Extended error information is returned by the FpGetErrno function:

sys_eacces
  File is not a regular file, or has no execute permission. A compononent of the path has no search permission.
sys_eperm
  The file system is mounted noexec.
sys_e2big
  Argument list too big.
sys_enoexec
  The magic number in the file is incorrect.
sys_enoent
  The file does not exist.
sys_enomem
  Not enough memory for kernel.
sys_enotdir
  A component of the path is not a directory.
sys_eloop
  The path contains a circular reference (via symlinks).

FpExecve FpFork
Execute process, search path using environment
FpExecVP
replaces the currently running program with the program, specified in PathName. The executable in path is searched in the path, if it isn't an absolute filename. It gives the program the options in args. This is a pointer to an array of pointers to null-terminated strings. The last pointer in this array should be nil. The environment in Env is passed to the program. On success, execvp does not return.

Extended error information is returned by the FpGetErrno function:

sys_eacces
  File is not a regular file, or has no execute permission. A compononent of the path has no search permission.
sys_eperm
  The file system is mounted noexec.
sys_e2big
  Argument list too big.
sys_enoexec
  The magic number in the file is incorrect.
sys_enoent
  The file does not exist.
sys_enomem
  Not enough memory for kernel.
sys_enotdir
  A component of the path is not a directory.
sys_eloop
  The path contains a circular reference (via symlinks).

FpExecve FpFork
Execute and feed command to system shell
Shell
invokes the bash shell (/bin/sh), and feeds it the command Command (using the -c option). The function then waits for the command to complete, and then returns the exit status of the command, or 127 if it could not complete the FpFork or FpExecve calls.
Extended error information is returned by the FpGetErrno function:
FpFork FpExecve
Execute and feed command to system shell
Shell
invokes the bash shell (/bin/sh), and feeds it the command Command (using the -c option). The function then waits for the command to complete, and then returns the exit status of the command, or 127 if it could not complete the FpFork or FpExecve calls.
Errors are reported in LinuxError.
FpFork FpExecve
Wait for process to terminate.

WaitProcess waits for process PID to exit. WaitProcess is equivalent to the call:

FpWaitPid(PID,@result,0)

Handles of Signal interrupts (errno=EINTR), and returns the Exitcode of Process PID (>=0) or -Status if it was terminated

None.
Check whether the process is currently stopped.
WIFSTOPPED
checks Status and returns true if the process is currently stopped. This is only possible if WUNTRACED was specified in the options of FpWaitPID.
Construct an exit status based on an return code and signal.
W_EXITCODE
combines ReturnCode and Signal to a status code fit for WaitPid.
Construct an exit status based on a signal.
W_STOPCODE
constructs an exit status based on Signal, which will cause WIFSIGNALED to return True
Synchronize file's kernel data with disk.

Fsync synchronizes the kernel data for file fd (the cache) with the disk. The call will not return till all file data was written to disk.

If the call was succesfull, 0 is returned. On failure, a nonzero value is returned.

Extended error information is returned by the FpGetErrno function:
Lock a file (advisory lock)

FpFLock implements file locking. it sets or removes a lock on the file F. F can be of type Text or File, or it can be a linux filedescriptor (a longint) Mode can be one of the following constants :

LOCK_SH
  sets a shared lock.
LOCK_EX
  sets an exclusive lock.
LOCK_UN
  unlocks the file.
LOCK_NB
  This can be OR-ed together with the other. If this is done the application doesn't block when locking.

The function returns zero if successful, a nonzero return value indicates an error.

Extended error information is returned by the FpGetErrno function:
Retrieve filesystem information from a file descriptor.

fStatFS returns in Info information about the filesystem on which the file with file descriptor fd resides. Info is of type TStatFS.

The function returns zero if the call was succesful, a nonzero value is returned if the call failed.

Extended error information is returned by the FpGetErrno function:

sys_enotdir
  A component of Path is not a directory.
sys_einval
  Invalid character in Path.
sys_enoent
  Path
  does not exist.
sys_eaccess
  Search permission is denied for component inPath.
sys_eloop
  A circular symbolic link was encountered in Path.
sys_eio
  An error occurred while reading from the filesystem.

Retrieve filesystem information from a path.

StatFS returns in Info information about the filesystem on which the file Path resides. Info is of type TStatFS.

The function returns zero if the call was succesful, a nonzero value is returned if the call failed.

Extended error information is returned by the FpGetErrno function:

sys_enotdir
  A component of Path is not a directory.
sys_einval
  Invalid character in Path.
sys_enoent
  Path
  does not exist.
sys_eaccess
  Search permission is denied for component inPath.
sys_eloop
  A circular symbolic link was encountered in Path.
sys_eio
  An error occurred while reading from the filesystem.

Wait for event on text file.
SelectText
executes the FpSelect call on a file of type Text. You can specify a timeout in TimeOut. The SelectText call determines itself whether it should check for read or write, depending on how the file was opened : With Reset it is checked for reading, with Rewrite and Append it is checked for writing.
See . SYS_EBADF can also mean that the file wasn't opened.
Seek to position in directory

SeekDir sets the directory pointer to the loc-th entry in the directory structure pointed to by p.

For an example, see .

Extended error information is returned by the FpGetErrno function:
Return current location in a directory

TellDir returns the current location in the directory structure pointed to by p. It returns -1 on failure.

For an example, see .

Create a set of pipe file handlers

AssignePipe creates a pipe, i.e. two file objects, one for input, one for output. What is written to Pipe_out, can be read from Pipe_in.

This call is overloaded. The in and out pipe can take three forms: an typed or untyped file, a text file or a file descriptor.

If a text file is passed then reading and writing from/to the pipe can be done through the usual Readln(Pipe_in,...) and Writeln(Pipe_out,...) procedures.

The function returns True if everything went succesfully, False otherwise.

In case the function fails and returns False, extended error information is returned by the FpGetErrno function:

sys_emfile
  Too many file descriptors for this process.
sys_enfile
  The system file table is full.

Pipe file to standard input/output of program
POpen
runs the command specified in Prog, and redirects the standard in or output of the command to the other end of the pipe F. The parameter rw indicates the direction of the pipe. If it is set to 'W', then F can be used to write data, which will then be read by the command from stdinput. If it is set to 'R', then the standard output of the command can be read from F. F should be reset or rewritten prior to using it. F can be of type Text or File. A file opened with POpen can be closed with Close, but also with . The result is the same, but PClose returns the exit status of the command Prog.
Extended error information is returned by the FpGetErrno function. Errors are essentially those of the Execve, Dup and AssignPipe commands.
Assign stream for in and output to a program

AssignStream creates a 2 or 3 pipes, i.e. two (or three) file objects, one for input, one for output,(and one for standard error) the other ends of these pipes are connected to standard input and output (and standard error) of Prog. Prog is the name of a program (including path) with options, which will be executed.

What is written to StreamOut, will go to the standard input of Prog. Whatever is written by Prog to it's standard output can be read from StreamIn. Whatever is written by Prog to it's standard error read from StreamErr, if present.

Reading and writing happens through the usual Readln(StreamIn,...) and Writeln (StreamOut,...) procedures.

You should not use Reset or Rewrite on a file opened with POpen. This will close the file before re-opening it again, thereby closing the connection with the program.

The function returns the process ID of the spawned process, or -1 in case of error.

Extended error information is returned by the FpGetErrno function.

sys_emfile
  Too many file descriptors for this process.
sys_enfile
  The system file table is full.

Other errors include the ones by the fork and exec programs

Return current domain name
Get the domain name of the machine on which the process is running. An empty string is returned if the domain is not set.
None.
Return host name
Get the hostname of the machine on which the process is running. An empty string is returned if hostname is not set.
None.
Expand filename to fully qualified path
FExpand
expands Path to a full path, starting from root, eliminating directory references such as . and .. from the result.
None
Search for file in search path.

FSearch searches in DirList, a colon separated list of directories, for a file named Path. It then returns a path to the found file.

The CurrentDirStrategy determines how the current directory is treated when searching:

NoCurrentDirectory
CurrentDirectoryFirst
CurrentDirectoryLast

It is mainly provided to mimic DOS search path behaviour. Default behaviour is to search the current directory first.

An empty string if no such file was found.
Find filenames matching a wildcard pattern

Glob returns a pointer to a glob structure which contains all filenames which exist and match the pattern in Path. The pattern can contain wildcard characters, which have their usual meaning.

Returns nil on error, and extended error information is returned by the FpGetErrno function.

sys_enomem
  No memory on heap for glob structure.
others
  As returned by the opendir call, and sys_readdir.

Free result of call

Releases the memory, occupied by a pglob structure. P is set to nil.

For an example, see .

None
Raise a signal (send to current process)
SigRaise
sends a Sig signal to the current process.
None.
Return kernel time of day in GMT

FpGetTimeOfDay returns the number of seconds since 00:00, January 1 1970, GMT in a timeval record. This time NOT corrected any way, not taking into account timezones, daylight savings time and so on.

It is simply a wrapper to the kernel system call.

None.
Close file opened with

PClose closes a file opened with . It waits for the command to complete, and then returns the exit status of the command.

For an example, see

Extended error information is returned by the FpGetErrno function.