Table 4.1. Qore Class List
Name | Description |
|---|---|
For reading and writing files. | |
For handling of directories, listing files, and creating/removing subdirectories. | |
For communicating with FTP servers. | |
For processing command-line options. | |
For parsing and executing application-embedded or user-supplied logic. | |
For communication with IPv4 sockets with and without TSL/SSL encryption. | |
Used when getting or setting terminal settings. | |
For communication with HTTP servers with and without TSL/SSL encryption. | |
For working with X.509 certificates. | |
For working with private key data. | |
For working with databases; provides the user interface to qore DBI drivers. | |
Provides transparent per-thread, per-transaction Datasource connection pooling. | |
The class providing the most flexibilty for executing SQL on a database server. | |
The abstract base class for locks that support the internal API for use with the Condition class. | |
A helper class for the Gate class for exception-safe Gate handling. | |
A helper class for the Mutex class for exception-safe Mutex handling. | |
A helper class for the RWLock class for exception-safe read lock handling. | |
A helper class for the RWLock class for exception-safe write lock handling. | |
For blocking a thread until a condition becomes true. | |
For blocking a thread until a counter becomes zero. | |
A reentrant thread lock. | |
A simple thread lock. | |
A blocking, thread-safe queue class, useful for message passing (can also be used as a stack). | |
DEPRECATED: A reentrant thread lock; use Gate instead. | |
A read-write thread lock. | |
A thread-safe integral counter. |
The following constants are defined in the Qore namespace.
Table 4.2. Build and Version Constants
Key | Type | Description |
|---|---|---|
| The operating system used to build the Qore library. | |
| The CPU used as a target for the Qore library build. | |
| The full version string for this version of the Qore library. | |
| An integer giving the Qore library's major version number. | |
| An integer giving the Qore library's minor version number. | |
| An integer giving the Qore library's release version number. | |
| An integer giving the Qore library's subversion revision number. | |
| A string giving information about the host used to compile the Qore library. | |
| The compiler used to build the Qore library. | |
| The compiler flags used to compile the Qore library. | |
| The linker flags used to link the Qore library. |
Table 4.3. Machine Constants
Key | Type | Description |
|---|---|---|
| If |
Table 4.4. Library Options
Name | Type | Description |
|---|---|---|
| Indicates if the Qore library supports fast atomic reference counting. Note that if this constant is | |
| Indicates if the Qore library supports file locking; currently this depends on UNIX-style file locking with the fnctl() function. | |
| Indicates if the fork() function is available. This constant is always | |
| Indicates if the getppid() function is available. This constant is always | |
| Indicates if the Qore library supports the is_executable() function; currently this function is only available when running on UNIX or UNIX-like platforms. | |
| Indicates if the kill() function is available. This constant is always | |
| Indicates if the openssl library used to build the qore library supported the MDC2 algorithm and therefore if the MDC2() and MDC2_bin() functions are available. | |
| Indicates if the openssl library used to build the qore library supported the MD2 algorithm and therefore if the MD2() and MD2_bin() functions are available. | |
| Indicates if the openssl library used to build the qore library supported the RC5 encryption algorithm and therefore if the rc5_encrypt_cbc(), rc5_decrypt_cbc() and rc5_encrypt_cbc_to_string() functions are available. | |
| Indicates if the round() function is available; the availability of this function depends on the presence of the C-library's round() function. | |
| Indicates if active thread stack tracing has been enabled as a debugging option and if the getAllThreadCallStacks() function is available. | |
| Indicates if the seteuid() function is available; the availabilty of this function depends on the system's underlying C-library. This constant is always | |
| Indicates if the setegid() function is available. This constant is always | |
| Indicates if the setsid() function is available on the current platform. This constant is always | |
| Indicates if the openssl library used to build the qore library supported the SHA224 algorithm and therefore if the SHA224() and SHA224_bin() functions are available. | |
| Indicates if the openssl library used to build the qore library supported the SHA256 algorithm and therefore if the SHA256() and SHA256_bin() functions are available. | |
| Indicates if the openssl library used to build the qore library supported the SHA384 algorithm and therefore if the SHA384() and SHA384_bin() functions are available. | |
| Indicates if the openssl library used to build the qore library supported the SHA512 algorithm and therefore if the SHA512() and SHA512_bin() functions are available. | |
| Indicates if protection against stack overruns is provided | |
| Indicates if the statvfs() function is available. This constant is always | |
| Indicates if the system() function is available. | |
| Indicates if the TermIOS class is available. This constant is always | |
| Always | |
| Indicates if UNIX-style file management functionality is available (ex: chown(), Dir::chgrp(), etc). This constant is always | |
| Indicates if UNIX-style user management functionality is available (ex: getuid(), setuid(), getgid(), setgid(), etc). This constant is always |
Table 4.7. Warning Constants
Name | Type | Description |
|---|---|---|
| Enables all warnings | |
| Enables warnings when the parser determines that the argument types of a function or method call are such that the operation is guaranteed to produce a constant value. See also call-with-type-errors. | |
| The default warning mask made up of: | |
| Enables a warning when deprecated code is used. See also deprecated. | |
| Enables a warning when a program declares a local variable more than once in the same block; note that this is not a warning but rather an error when %assume-local or %new-style parse options are set. See also duplicate-block-vars. | |
| Indicates that the embedded code has declared the same global variable more than once. See also duplicate-global-vars. | |
| Enables a warning when an immediate hash is declared and at least one of the keys is repeated. See also duplicate-hash-key. | |
| Enables a warning when a local variable with the same name is declared in a subblock (ie another local variable with the same name is reachable in the same lexical scope); note that this warning can raise false positives if the programmer is used to redeclaring the same variable names in subblocks. See also WARN_DUPLICATE_BLOCK_VARS and duplicate-local-vars. | |
| Enables a warning when a function or method call is made with more arguments than are used by the function or method. See also excess-args. | |
| Indicates that the embedded code performs some operation that is guaranteed to produce no result (for example, using the [] operator on an integer value). See also invalid-operation. | |
| No warnings are enabled with this constant. | |
| Indicates that the embedded code is calling an unknown method in a class; this may be vaild if the calling method is only called from a derived class that actually implements the method. See also non-existent-method-call. | |
| Enables a warning when a function or method call is made with no side effects and the return value is ignored. See also return-value-ignored. | |
| Indicates that the embedded code referenced an undeclared variable that will be assumed to be a global variable. See also undeclared-var. | |
| Indicates that the embedded code tried to enable or disable an unknown warning. See also unknown-warning. | |
| Indicates that code cannot be reached (for example; code in the same local block after an unconditional return or thread_exit statement). See also unreachable-code. | |
| This warning means that the embedded code tried to change the warning mask, but it was locked, so the warning mask was actually unchanged. See also warning-mask-unchanged. |
Table 4.8. Event Constants
Name | Value | Description |
|---|---|---|
| Raised when a network packet is received. | |
| Raised when a network packet is sent. | |
| Raised when the HTTP "Content-Length" header is received. | |
| Raised when HTTP chunked data is about to be received. | |
| Raised when all HTTP chunked data has been received. | |
| Raised when an HTTP redirect message is received. | |
| Raised when a socket is closed. | |
| Raised when the object being monitored is deleted. | |
| Raised immediately before an FTP control message is sent. | |
| Raised when an FTP reply is received on the control channel. | |
| Raised when a hostname lookup is attempted. | |
| Raised when a hostname lookup is resolved. | |
| Raised when an HTTP message is sent. | |
| Raised when an HTTP message is received. | |
| Raised when HTTP footers are received. | |
| Raised when a block of HTTP chunked data is received. | |
| Raised when the next chunk size for HTTP chunked data is known. | |
| Raised right before a socket connection attempt is made. | |
| Raised when the socket connection has been established. | |
| Raised when socket SSL negotiation starts. | |
| Raised when SSL communication has been negotiated and established. | |
| Raised right before a file is opened. | |
| Raised when a file has been successfully opened. | |
| Raised when data has been read from a file. | |
| Raised when data has been written to a file. | |
This constant is a hash that maps event numbers to string descriptions as described in this table. |
Table 4.9. Event Map Hash Constant
Key | String Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Table 4.11. Network Address Family Constants
Table 4.13. Network Address Information Constants
Name | Description |
|---|---|
| If the |
| If the |
| If the |
| If the |
| If the |
| If the |
| If the |
Table 4.14. Terminal Attributes Local Mode Constants
Name | Description |
|---|---|
| visual erase for line kill |
| visually erase chars |
| enable echoing |
| echo NL even if ECHO is off |
| visual erase mode for hardcopy |
| enable signals INTR, QUIT, [D]SUSP |
| canonicalize input lines |
| enable DISCARD and LNEXT |
| stop background jobs from output |
| output being flushed (state) |
| retype pending input (state) |
| don't flush after interrupt |
| use alternate WERASE algorithm (this constant is only available on some systems; do not use in portable programs) |
| external processing (this constant is only available on some systems; do not use in portable programs) |
| no kernel output from VSTATUS (this constant is only available on some systems; do not use in portable programs) |
Table 4.15. Terminal Attributes Control Mode Constants
Name | Description |
|---|---|
| character size mask |
| 5 bits (pseudo) |
| 6 bits |
| 7 bits |
| 8 bits |
| send 2 stop bits |
| enable receiver |
| parity enable |
| odd parity, else even |
| hang up on last close |
| ignore modem status lines |
| CTS flow control of output (this constant is only available on some systems; do not use in portable programs) |
| same as CCTS_OFLOW (this constant is only available on some systems; do not use in portable programs) |
| RTS flow control of input (this constant is only available on some systems; do not use in portable programs) |
| flow control output via Carrier (this constant is only available on some systems; do not use in portable programs) |
Table 4.16. Terminal Attributes Output Mode Constants
Name | Description |
|---|---|
| enable following output processing |
| map NL to CR-NL (ala CRMOD) |
| map CR to NL |
| No CR output at column 0 |
| NL performs CR function |
| expand tabs to spaces (this constant is only available on some systems; do not use in portable programs) |
| discard EOT's ctrl-D on output (this constant is only available on some systems; do not use in portable programs) |
| translate lower case to upper case (this constant is only available on some systems; do not use in portable programs) |
Table 4.17. Terminal Attributes Input Mode Constants
Name | Description |
|---|---|
| ignore BREAK condition |
| map BREAK to SIGINTR |
| ignore (discard) parity errors |
| mark parity and framing errors |
| enable checking of parity errors |
| strip 8th bit off chars |
| map NL into CR |
| ignore CR |
| map CR to NL (ala CRMOD) |
| enable output flow control |
| enable input flow control |
| any char will restart after stop |
| ring bell on input queue full |
| translate upper case to lower case (this constant is only available on some systems; do not use in portable programs) |
Table 4.18. Terminal Attributes Control Character Constants
Name | Special Character | Default Value |
|---|---|---|
|
| ^D |
|
|
|
|
|
|
|
| ^? `177' |
|
| ^W |
|
| ^U |
|
| ^C |
|
| ^\ `34' |
|
| ^Z |
|
| ^Q |
|
| ^S |
|
| ^V |
| n/a | 1 |
| n/a | 0 |
|
| ^R (this constant is only available on some systems; do not use in portable programs) |
|
| ^Y (this constant is only available on some systems; do not use in portable programs) |
|
| ^O (this constant is only available on some systems; do not use in portable programs) |
| n/a | ^T (this constant is only available on some systems; do not use in portable programs) |
The X509_VerificationReasons_Hash is a constant in the Qore namespace that maps verfication code strings (as returned from FtpClient::verifyPeerCertificate() and Socket::verifyPeerCertificate()) to textual descriptions.
Table 4.19. X506_VerificationReasons Hash
Key | Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The following gives a list of signal constants that may be present in Qore. Signal constants and their values are system-dependent; only signals that the host system defines will be present in Qore, therefore not all of the signals in the following list will be present in any given version of Qore. All signal constants are integers.
Table 4.20. Signal Constants in the Qore Namespace
Name | Description |
|---|---|
| Hangup signal. |
| Interrupt signal. |
| Quit signal. |
| Illegal instruction signal. |
| Trace trap signal. |
| Abort signal. |
| Pollable event signal. |
| Synonym for SIBABRT |
| EMT instruction signal. |
| Floating-point exception signal. |
| Kill signal (cannot be caught) |
| Bus error signal. |
| Segmentation violation signal. |
| Bad argument to a system call. |
| Write on pipe with no reader (this signal is always ignored in Qore). |
| Alarm clock signal. |
| Software termination signal. |
| Urgent condition on I/O channel. |
| Sendable stop signal (not from tty). |
| Stop signal from tty. |
| Continue a stopped process. |
| To parent on child stop or exit. |
| To reader's process group on background tty read. |
| To writer's process group on background tty write. |
| Input/Output possible signal. |
| Exceeded CPU time limit. |
| Exceeded file size limit. |
| Virtual time alarm signal. |
| Profiling time alarm signal. |
| Window size changes signal. |
| Information request signal. |
| User-defined signal 1. |
| User-defined signal 2. |
| Stack fault on coprocessor. |
| Synonym for SIGCHLD on some systems. |
| Power failure signal. |
| Resource (ex: file lock) lost signal. |
| (Solaris) Waiting signal. |
| (Solaris) Light-weight process (thread) signal. |
| (Solaris) Checkpoint freeze signal. |
| (Solaris) Checkpoint freeze thaw signal. |
| (Solaris) Cancel signal. |
| (Solaris) Resource control exceeded. |
| (Solaris) Java virtual machine 1 signal. |
| (Solaris) Java virtual machine 2 signal. |
There are two special system-specific constants mapping signal names to signal number and vice-versa as given in the following table.
Table 4.21. Signal Mapping Hash Constants in the Qore Namespace
Name | Description |
|---|---|
| A hash mapping signal numbers to signal names (ex: |
| A hash mapping signal names to signal numbers (ex: |
The Err namespace contains error constants, returned by the errno() function.
Table 4.22. Error Constants in the Err Namespace
Name | Type | Description |
|---|---|---|
| System-dependent integer ERRNO constants (ex: ENOMEM, etc) |
Table 4.23. Exception Constants in the Qore Namespace
Name | Type | Description |
|---|---|---|
| Exception Type System: used for system exceptions. | |
| Exception Type User: used for user exceptions (thrown using the throw statement. | |
| Call Type User: used for user function/method calls in a call stack. | |
| Call Type Builtin: used for builtin function/method calls in a call stack. | |
| Call Type New Thread: used in a call stack when a new thread is started with the background expression. | |
| Call Type Rethrow: a marker for a rethrown exception in a call stack. |
Table 4.24. Regular Expression Option Constants in the Qore Namespace
Name | Type and Value | Description |
|---|---|---|
|
| Ignores case when matching regular expressions, equivalent to /i |
|
| makes start-of-line (^) or end-of-line ($) match after or before any newline in the subject string, equivalent to /m |
|
| makes a dot (.) match a newline character, equivalent to /s |
|
| ignores whitespace characters and enables comments prefixed by #, equivalent to /x |
|
| replace all matches globally in the string, equivalent to /g |
Returns a hash of file status values for the path passed; symbolic links are not followed; information is returned about symbolic links (see File::hstat() for a version of this method that follows symbolic links).
If any errors occur, a FILE-HLSTAT-ERROR exception is thrown.
See also hlstat() for a normal function returns NOTHING instead of throwing an exception when errors occur.
static hash File::hlstat(string $path)
my string $type = File::hlstat("/bin/sh").type; # returns "REGULAR"
Not available with PO_NO_FILESYSTEM
Table 4.138. Arguments and Return Values for File::hlstat()
Argument Type | Return Type | Description |
|---|---|---|
| Returns a hash of file status values for the file passed or NOTHING if the |
Returns a hash of file status values for the file passed; symbolic links are followed; see File::hlstat() to retrieve information about a symbolic link.
If any errors occur, a FILE-HSTAT-ERROR exception is thrown.
See also hstat() for a normal function returns NOTHING instead of throwing an exception when errors occur.
static hash File::hstat(string $path)
my hash $h = File::hstat("/bin/sh");
Not available with PO_NO_FILESYSTEM
Returns a list of file status values for the file or symbolic link passed. Does not follow symbolic links, but rather returns filesystem information for symbolic links.
If any errors occur, a FILE-LSTAT-ERROR exception is thrown.
See also lstat() for a normal function returns NOTHING instead of throwing an exception when errors occur.
static list File::lstat(string $path)
my list $list = File::lstat("/bin/sh");
Not available with PO_NO_FILESYSTEM
Returns a list of file status values for the path passed, following any symbolic links.
If any errors occur, a FILE-STAT-ERROR exception is thrown.
See also stat() for a normal function returns NOTHING instead of throwing an exception when errors occur.
static list File::stat(string $path)
my int $mode = File::stat($filepath)[2];
Not available with PO_NO_FILESYSTEM
Returns a hash of filesystem status values for the path passed.
If any errors occur, a FILE-STATVFS-ERROR exception is thrown.
See also statvfs() for a normal function returns NOTHING instead of throwing an exception when errors occur.
static hash File::statvfs(string $path)
my hash $h = File::statvfs("/tmp")
Not available with PO_NO_FILESYSTEM
Table 4.146. Arguments and Return Values for File::statvfs()
Argument Type | Return Type | Description |
|---|---|---|
| Returns a hash of filesystem status values for the file or directory name passed; an exception is thrown if any errors occur. See also statvfs(). See Filesystem Status Hash for a description of the hash returned by this function. |
Table 4.147. Exceptions Thrown by File::statvfs()
err | desc |
|---|---|
|
|
| This exception is thrown when the method is not available on the runtime platform; for maximum portability, check the constant |