ONO::Core::HostIO is responsible for low level communication with the host operating system.
Note that file system I/O calls allow access to the entire host systems file system (unlike ONO::IO, which only accesses the file system within the document root).
Using this module in production projects should be avoided whenever possible, try to use ONO::IO or other library / toolbox features instead.
Change the group of a file or a directory.
Change the mode (permissions, access rights) of a file or a directory.
Recursively change the mode (permissions, access rights) of a file or a directory.
Change the owner of a file or a directory.
Recursively change both the owner and the group of a directory (or a file).
Check and clean input path (dir and file name), remove all special characters, don't allow paths starting by a dot. Add an optional ,1 to make this less restrictive.
Copy a file to a new location.
Copy a directory to a new location.
Not implemented (yet).
Check if dir or file exists
Add a UNIX group on the host OS. Note that this feature will need to be run as root.
Check if a UNIX group exists on the host OS, return its basic info if true.
List a file, return its content as an array of lines.
Load a file, return its content, removing carriage returns (line feeds will be kept).
List files and directories
Reload / restart all mailserver services on the host OS. Note that this feature will need to be run as root.
Create a new directory.
Move a file or a directory to a new location.
Remove / delete a file
Recursively remove / delete a directory. This has not been implemented, as it is considered to be too dangerous.
Return the size of a file in bytes.
Store a content to a file. Be careful, existing files will be overwritten!
Create a symbolic link
Return the modification timestamp of a file or directory
Remove a symbolic link
Return dir usage in KB
Add a UNIX user on the host OS. Note that this feature will need to be run as root.
Remove a UNIX user on the host OS. Note that this feature will need to be run as root.
Check if a UNIX user exists on the host OS, return its basic info if true.
Change a UNIX user's password on the host OS. Note that this feature will need to be run as root.