\hypertarget{group__filesystem__functions}{}\doxysection{Filesystem Functions}
\label{group__filesystem__functions}\index{Filesystem Functions@{Filesystem Functions}}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
bool \mbox{\hyperlink{group__filesystem__functions_ga59a85037788f39c5269f0aadbb499f90}{Qore\+::absolute\+\_\+path}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em returns \mbox{\hyperlink{basic_data_types_True}{True}} if the argument is an absolute path on the current platform, \mbox{\hyperlink{basic_data_types_False}{False}} if not \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__filesystem__functions_gac13e5f3c1a03fbb5e6c60213a595795f}{Qore\+::absolute\+\_\+path\+\_\+unix}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em returns \mbox{\hyperlink{basic_data_types_True}{True}} if the argument is a UNIX absolute path, \mbox{\hyperlink{basic_data_types_False}{False}} if not \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__filesystem__functions_ga77456f40ff1734bb6d5692e6dbb9e8eb}{Qore\+::absolute\+\_\+path\+\_\+windows}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em returns \mbox{\hyperlink{basic_data_types_True}{True}} if the argument is a Windows absolute path, \mbox{\hyperlink{basic_data_types_False}{False}} if not \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__filesystem__functions_gada7c93e7806a58bee29f2357039479e1}{Qore\+::chdir}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Changes the current working directory for the current process. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__filesystem__functions_ga1e5c4b6f766ada91769b932f77c33254}{Qore\+::chmod}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path, softint mode)
\begin{DoxyCompactList}\small\item\em Changes the mode of a file or directory. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__filesystem__functions_ga3c6e7029d5759c6cabfca1d7e3b27898}{Qore\+::chown}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path, softint owner=-\/1, softint group=-\/1)
\begin{DoxyCompactList}\small\item\em Changes the user and group owners of a file, if the current user has permission to do so (normally only the superuser can change the user owner), follows symbolic links. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__filesystem__functions_ga891ce19bfbec289e7ef2a1e20d44ba4a}{Qore\+::getcwd}} ()
\begin{DoxyCompactList}\small\item\em Returns a string giving the current working directory or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the current working directory could not be read. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__filesystem__functions_ga2ea46565552ed8a0fb60752a10c43d59}{Qore\+::getcwd2}} ()
\begin{DoxyCompactList}\small\item\em Returns a string giving the current working directory; throws an exception if the current directory cannot be read. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ \mbox{\hyperlink{group__filesystem__functions_gad6696b486d0383d06e26cddc1b2c2b18}{Qore\+::glob}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} glob\+\_\+str)
\begin{DoxyCompactList}\small\item\em Returns a list of files matching the string argument or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the call to \mbox{\hyperlink{group__filesystem__functions_ga2d74de13e8fb0f3bb690647818cd068a}{glob()}} fails. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__filesystem__functions_ga2d74de13e8fb0f3bb690647818cd068a}{Qore\+::glob}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_stat_info}{Stat\+Info}} $>$ \mbox{\hyperlink{group__filesystem__functions_gada78e1111eafb0b827a3a72844042ce9}{Qore\+::hlstat}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns a \mbox{\hyperlink{struct_qore_1_1_stat_info}{Stat\+Info}} hash for the path argument and does not follow symbolic links; if any errors occur, \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} is returned and \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to retrieve the error number. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__filesystem__functions_gabb441e137499385661b294f05e1b18fe}{Qore\+::hlstat}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_stat_info}{Stat\+Info}} $>$ \mbox{\hyperlink{group__filesystem__functions_ga47be77088773feba54d2185de658c9dd}{Qore\+::hstat}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns a \mbox{\hyperlink{struct_qore_1_1_stat_info}{Stat\+Info}} hash for the path argument, following any symbolic links; if any errors occur, \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} is returned and \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to retrieve the error number. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__filesystem__functions_gae2beafb85bdfb88495f1645605a96b0a}{Qore\+::hstat}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__filesystem__functions_ga139846d1deedb967e21af11e62799ea2}{Qore\+::is\+\_\+bdev}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a block device on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__filesystem__functions_ga56ae16710a38109b7ed71010a5b3d9e5}{Qore\+::is\+\_\+cdev}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a character device on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__filesystem__functions_ga594e6a60ad12517656d32a7262777b4d}{Qore\+::is\+\_\+dev}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a device (either block or character) on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__filesystem__functions_ga38348592b2e5aa5589e0399c10b260fd}{Qore\+::is\+\_\+dir}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a directory on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__filesystem__functions_ga0255009acc4b2cb332fd3f9d2aae7c05}{Qore\+::is\+\_\+executable}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies an executable on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__filesystem__functions_ga6117e36222d08c197c2c0de1cadea715}{Qore\+::is\+\_\+file}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a regular file on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__filesystem__functions_ga55cb552f0c56f8ff6915ec7ad6ab3cd8}{Qore\+::is\+\_\+link}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a symbolic link on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__filesystem__functions_ga646f8b88054dbb2004e8f47ec09aa96e}{Qore\+::is\+\_\+pipe}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a pipe (FIFO) on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__filesystem__functions_gaf04a8a04f9130664f938cf7dc10dbaed}{Qore\+::is\+\_\+readable}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a file or a directory readable by the current user, \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__filesystem__functions_ga568996f46411f4fa0daaaa4e61d20d44}{Qore\+::is\+\_\+socket}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a socket on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__filesystem__functions_ga1f94b219bfc67a292a80cafcd2416ee5}{Qore\+::is\+\_\+writable}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a file or a directory writable by the current user, \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__filesystem__functions_gaa7817f6649fdd56e82c65d9f62c8a707}{Qore\+::is\+\_\+writeable}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a file or a directory writable by the current user (backwards-\/compatible misspelling of \mbox{\hyperlink{group__filesystem__functions_ga1f94b219bfc67a292a80cafcd2416ee5}{is\+\_\+writable()}}) \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__filesystem__functions_gaa1536aa5f9d482dd449ad3e5f53a8507}{Qore\+::lchown}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path, softint uid=-\/1, softint gid=-\/1)
\begin{DoxyCompactList}\small\item\em Changes the user and group owners of a file, if the current user has permission to do so (normally only the superuser can change the user owner), does not follow symbolic links but rather operates on the symbolic link itself. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ auto $>$ \mbox{\hyperlink{group__filesystem__functions_ga02983a5bb34ee0015ff4e6e6342144a2}{Qore\+::lstat}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns a \mbox{\hyperlink{group__filesystem__functions_stat_list}{list of file status values}} for the path argument and does not follow symbolic links; if any errors occur, \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} is returned and \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to retrieve the error number. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__filesystem__functions_ga0ac877d2d854200d4f7eed50e6a71cf5}{Qore\+::lstat}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__filesystem__functions_ga834e1f95eb108bd6e4d564daecd68eda}{Qore\+::mkdir}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path, softint mode=0777, bool parents=\mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}})
\begin{DoxyCompactList}\small\item\em Creates a directory, optionally specifying the mode. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__filesystem__functions_ga93887c395ed9044e39a25046ab27f7b3}{Qore\+::mkdir\+\_\+ex}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path, softint mode=0777, bool parents=\mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}})
\begin{DoxyCompactList}\small\item\em Creates a directory, optionally specifying the mode; throws an exception on error. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__filesystem__functions_ga637652709e0dd1c846475de2dcfc7d96}{Qore\+::mkfifo}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path, softint mode=0600)
\begin{DoxyCompactList}\small\item\em Creates a named pipe file with an optional file mode. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__filesystem__functions_ga5de4265158222c7dc319c901943ee3a7}{Qore\+::readlink}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns the target of a symbolic link; throws an exception if an error occurs (ex\+: file does not exist or is not a symbolic link) \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__filesystem__functions_ga59c7b40bb68308943c26473b3536594d}{Qore\+::realpath}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns the canonicalized absolute pathname from the given path. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__filesystem__functions_ga4511dfd33a6baf40c66c91a4cbc9a5b4}{Qore\+::rename}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} old\+\_\+path, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} new\+\_\+path)
\begin{DoxyCompactList}\small\item\em Renames (or moves) files or directories. Note that for this call to function properly, the Qore process must have sufficient permissions and access to the given filesystem objects or paths to execute the rename operation. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__filesystem__functions_ga56d2abad877339557cdd3c04660e77e9}{Qore\+::rmdir}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Removes a directory. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ auto $>$ \mbox{\hyperlink{group__filesystem__functions_gada45281a050684839af46169dff637fb}{Qore\+::stat}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns a \mbox{\hyperlink{group__filesystem__functions_stat_list}{list of file status values}} for the path argument, following any symbolic links; if any errors occur, \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} is returned and \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to retrieve the error number. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__filesystem__functions_gaff2c972124d3a61309d62b6394ab9896}{Qore\+::stat}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_filesystem_info}{Filesystem\+Info}} $>$ \mbox{\hyperlink{group__filesystem__functions_ga85b344e9fcc98bd36fd18b5a0fe53d8c}{Qore\+::statvfs}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns a hash of filesystem status values for the file or directory path passed. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__filesystem__functions_gae895213e0d9f207ab855e4546c791909}{Qore\+::symlink}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} old\+\_\+path, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} new\+\_\+path)
\begin{DoxyCompactList}\small\item\em Creates a symbolic link to a directory path. Note that for this call to function properly, the Qore process must have sufficient permissions and access to the given filesystem path to create the symbolic link. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__filesystem__functions_gad5d35a9e2871b2163d7ff65d717ed106}{Qore\+::umask}} (softint mask)
\begin{DoxyCompactList}\small\item\em Sets the file creation mode mask for the process and returns the previous value of the file creation mode mask. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__filesystem__functions_ga2061a066ab6e3c668849520e6c371d59}{Qore\+::umask}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__filesystem__functions_gaac76dbcada98d67b28a84e7296587b10}{Qore\+::unlink}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Deletes a file and returns 0 for success, -\/1 for error (in which case \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to get the error) \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__filesystem__functions_ga3e6fdb79f8eb0792ae20f1b86e695d1a}{Qore\+::unlink}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The following functions return information about or are related to the filesystem.

All of the functions in this section (except \mbox{\hyperlink{group__filesystem__functions_ga2061a066ab6e3c668849520e6c371d59}{umask()}}) are flagged with \mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}

\begin{DoxySeeAlso}{See also}
the \mbox{\hyperlink{class_qore_1_1_file}{File}} class for a class enabling files to be created, read or written, and the \mbox{\hyperlink{class_qore_1_1_dir}{Dir}} class allowing directories to be manipulated
\end{DoxySeeAlso}
\hypertarget{group__filesystem__functions_stat_list}{}\doxysubsection{Stat List}\label{group__filesystem__functions_stat_list}
 \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{3}{|X[-1]}|}
\hline
{\bfseries{Element}} &{\bfseries{Data \mbox{\hyperlink{namespace_qore_1_1_type}{Type}}}} &{\bfseries{Description}}  \\\cline{1-3}
{\ttfamily 0}  &\mbox{\hyperlink{data_type_declarations_int_type}{int}} &device inode number the file is on  \\\cline{1-3}
{\ttfamily 1}  &\mbox{\hyperlink{data_type_declarations_int_type}{int}} &inode of the file  \\\cline{1-3}
{\ttfamily 2}  &\mbox{\hyperlink{data_type_declarations_int_type}{int}} &inode protection mode  \\\cline{1-3}
{\ttfamily 3}  &\mbox{\hyperlink{data_type_declarations_int_type}{int}} &number of hard links to this file  \\\cline{1-3}
{\ttfamily 4}  &\mbox{\hyperlink{data_type_declarations_int_type}{int}} &user ID of the owner  \\\cline{1-3}
{\ttfamily 5}  &\mbox{\hyperlink{data_type_declarations_int_type}{int}} &group ID of the owner  \\\cline{1-3}
{\ttfamily 6}  &\mbox{\hyperlink{data_type_declarations_int_type}{int}} &device type number  \\\cline{1-3}
{\ttfamily 7}  &\mbox{\hyperlink{data_type_declarations_int_type}{int}} &file size in bytes  \\\cline{1-3}
{\ttfamily 8}  &\mbox{\hyperlink{data_type_declarations_date_type}{date}} &last access time of the file  \\\cline{1-3}
{\ttfamily 9}  &\mbox{\hyperlink{data_type_declarations_date_type}{date}} &last modified time of the file  \\\cline{1-3}
{\ttfamily 10}  &\mbox{\hyperlink{data_type_declarations_date_type}{date}} &last change time of the file\textquotesingle{}s inode  \\\cline{1-3}
{\ttfamily 11}  &\mbox{\hyperlink{data_type_declarations_int_type}{int}} &block size; may be zero if the platform\textquotesingle{}s internal stat() (2) function does not provide this info  \\\cline{1-3}
{\ttfamily 12}  &\mbox{\hyperlink{data_type_declarations_int_type}{int}} &blocks allocated for the file; may be zero if the platform\textquotesingle{}s internal stat() (2) function does not provide this info  \\\cline{1-3}
\end{longtabu}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__filesystem__functions_ga59a85037788f39c5269f0aadbb499f90}\label{group__filesystem__functions_ga59a85037788f39c5269f0aadbb499f90}} 
\index{Filesystem Functions@{Filesystem Functions}!absolute\_path@{absolute\_path}}
\index{absolute\_path@{absolute\_path}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{absolute\_path()}{absolute\_path()}}
{\footnotesize\ttfamily bool Qore\+::absolute\+\_\+path (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



returns \mbox{\hyperlink{basic_data_types_True}{True}} if the argument is an absolute path on the current platform, \mbox{\hyperlink{basic_data_types_False}{False}} if not 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool abs = absolute\_path(path);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the argument is an absolute path, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__filesystem__functions_gac13e5f3c1a03fbb5e6c60213a595795f}{Qore\+::absolute\+\_\+path\+\_\+unix()}}
\item \mbox{\hyperlink{group__filesystem__functions_ga77456f40ff1734bb6d5692e6dbb9e8eb}{Qore\+::absolute\+\_\+path\+\_\+windows()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 this function is a native function in Qore; moved from the \href{../../modules/Util/html/index.html}{\texttt{ Util}} module 
\end{DoxySince}
\mbox{\Hypertarget{group__filesystem__functions_gac13e5f3c1a03fbb5e6c60213a595795f}\label{group__filesystem__functions_gac13e5f3c1a03fbb5e6c60213a595795f}} 
\index{Filesystem Functions@{Filesystem Functions}!absolute\_path\_unix@{absolute\_path\_unix}}
\index{absolute\_path\_unix@{absolute\_path\_unix}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{absolute\_path\_unix()}{absolute\_path\_unix()}}
{\footnotesize\ttfamily bool Qore\+::absolute\+\_\+path\+\_\+unix (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



returns \mbox{\hyperlink{basic_data_types_True}{True}} if the argument is a UNIX absolute path, \mbox{\hyperlink{basic_data_types_False}{False}} if not 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool abs = absolute\_path\_unix(path);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the argument is a UNIX absolute path, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__filesystem__functions_ga59a85037788f39c5269f0aadbb499f90}{Qore\+::absolute\+\_\+path()}}
\item \mbox{\hyperlink{group__filesystem__functions_ga77456f40ff1734bb6d5692e6dbb9e8eb}{Qore\+::absolute\+\_\+path\+\_\+windows()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 this function is a native function in Qore; moved from the \href{../../modules/Util/html/index.html}{\texttt{ Util}} module 
\end{DoxySince}
\mbox{\Hypertarget{group__filesystem__functions_ga77456f40ff1734bb6d5692e6dbb9e8eb}\label{group__filesystem__functions_ga77456f40ff1734bb6d5692e6dbb9e8eb}} 
\index{Filesystem Functions@{Filesystem Functions}!absolute\_path\_windows@{absolute\_path\_windows}}
\index{absolute\_path\_windows@{absolute\_path\_windows}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{absolute\_path\_windows()}{absolute\_path\_windows()}}
{\footnotesize\ttfamily bool Qore\+::absolute\+\_\+path\+\_\+windows (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



returns \mbox{\hyperlink{basic_data_types_True}{True}} if the argument is a Windows absolute path, \mbox{\hyperlink{basic_data_types_False}{False}} if not 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool abs = absolute\_path\_windows(path);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the argument is a Windows absolute path, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__filesystem__functions_ga59a85037788f39c5269f0aadbb499f90}{Qore\+::absolute\+\_\+path()}}
\item \mbox{\hyperlink{group__filesystem__functions_gac13e5f3c1a03fbb5e6c60213a595795f}{Qore\+::absolute\+\_\+path\+\_\+unix()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 this function is a native function in Qore; moved from the \href{../../modules/Util/html/index.html}{\texttt{ Util}} module 
\end{DoxySince}
\mbox{\Hypertarget{group__filesystem__functions_gada7c93e7806a58bee29f2357039479e1}\label{group__filesystem__functions_gada7c93e7806a58bee29f2357039479e1}} 
\index{Filesystem Functions@{Filesystem Functions}!chdir@{chdir}}
\index{chdir@{chdir}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{chdir()}{chdir()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::chdir (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Changes the current working directory for the current process. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}, \mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the new working directory for the current process\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if no error occurred; -\/1 if an error occurred, in which case \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} and/or \mbox{\hyperlink{group__library__functions_gadfdbab96958d3623d431a7ab292d7e27}{strerror()}} can be used to retrieve the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (chdir(dir))}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}chdir \%s: \%s\(\backslash\)n"{}}, dir, strerror());}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+4 this function is tagged with \mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}} 
\end{DoxySince}
\mbox{\Hypertarget{group__filesystem__functions_ga1e5c4b6f766ada91769b932f77c33254}\label{group__filesystem__functions_ga1e5c4b6f766ada91769b932f77c33254}} 
\index{Filesystem Functions@{Filesystem Functions}!chmod@{chmod}}
\index{chmod@{chmod}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{chmod()}{chmod()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::chmod (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path,  }\item[{softint}]{mode }\end{DoxyParamCaption})}



Changes the mode of a file or directory. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to the file or directory to change \\
\hline
{\em mode} & the new mode for the file or directory\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if no error occurred; -\/1 if an error occurred, in which case \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} and/or \mbox{\hyperlink{group__library__functions_gadfdbab96958d3623d431a7ab292d7e27}{strerror()}} can be used to retrieve the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (chmod(\textcolor{stringliteral}{"{}/bin/login"{}}, 0755))}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}rmdir /tmp/newdir: \%s\(\backslash\)n"{}}, strerror());}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_ga3c6e7029d5759c6cabfca1d7e3b27898}\label{group__filesystem__functions_ga3c6e7029d5759c6cabfca1d7e3b27898}} 
\index{Filesystem Functions@{Filesystem Functions}!chown@{chown}}
\index{chown@{chown}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{chown()}{chown()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::chown (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path,  }\item[{softint}]{owner = {\ttfamily -\/1},  }\item[{softint}]{group = {\ttfamily -\/1} }\end{DoxyParamCaption})}



Changes the user and group owners of a file, if the current user has permission to do so (normally only the superuser can change the user owner), follows symbolic links. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_gaac007b653cdc3acf169c9cc76ce4a928}{Qore\+::\+Option\+::\+HAVE\+\_\+\+UNIX\+\_\+\+FILEMGT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & path to the file or directory to change \\
\hline
{\em owner} & the uid of the new user owner; -\/1 means do not change user owner \\
\hline
{\em group} & the gid of the new group owner; -\/1 means do not change group owner\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if no error occurred; -\/1 if an error occurred, in which case \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} and/or \mbox{\hyperlink{group__library__functions_gadfdbab96958d3623d431a7ab292d7e27}{strerror()}} can be used to retrieve the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (chown(\textcolor{stringliteral}{"{}/bin/login"{}}, 0, 0))}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}chown /bin/login: \%s\(\backslash\)n"{}}, strerror());}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__filesystem__functions_gaa1536aa5f9d482dd449ad3e5f53a8507}{lchown()}} for a version of this function that does not follow symbolic links 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__filesystem__functions_ga891ce19bfbec289e7ef2a1e20d44ba4a}\label{group__filesystem__functions_ga891ce19bfbec289e7ef2a1e20d44ba4a}} 
\index{Filesystem Functions@{Filesystem Functions}!getcwd@{getcwd}}
\index{getcwd@{getcwd}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{getcwd()}{getcwd()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::getcwd (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a string giving the current working directory or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the current working directory could not be read. 

\begin{DoxyReturn}{Returns}
a string giving the current working directory or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the current working directory could not be read
\end{DoxyReturn}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}, \mbox{\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+INFO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*string cwd = getcwd();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__filesystem__functions_ga2ea46565552ed8a0fb60752a10c43d59}{getcwd2()}} for a similar function that throws an exception if an error occurs instead 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__filesystem__functions_ga2ea46565552ed8a0fb60752a10c43d59}\label{group__filesystem__functions_ga2ea46565552ed8a0fb60752a10c43d59}} 
\index{Filesystem Functions@{Filesystem Functions}!getcwd2@{getcwd2}}
\index{getcwd2@{getcwd2}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{getcwd2()}{getcwd2()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::getcwd2 (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a string giving the current working directory; throws an exception if the current directory cannot be read. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}, \mbox{\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+INFO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string cwd = getcwd2();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__filesystem__functions_ga891ce19bfbec289e7ef2a1e20d44ba4a}{getcwd()}} for a similar function that returns \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} instead of throwing an exception if an error occurs 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__filesystem__functions_ga2d74de13e8fb0f3bb690647818cd068a}\label{group__filesystem__functions_ga2d74de13e8fb0f3bb690647818cd068a}} 
\index{Filesystem Functions@{Filesystem Functions}!glob@{glob}}
\index{glob@{glob}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{glob()}{glob()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::glob (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_gad6696b486d0383d06e26cddc1b2c2b18}\label{group__filesystem__functions_gad6696b486d0383d06e26cddc1b2c2b18}} 
\index{Filesystem Functions@{Filesystem Functions}!glob@{glob}}
\index{glob@{glob}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{glob()}{glob()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ Qore\+::glob (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{glob\+\_\+str }\end{DoxyParamCaption})}



Returns a list of files matching the string argument or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the call to \mbox{\hyperlink{group__filesystem__functions_ga2d74de13e8fb0f3bb690647818cd068a}{glob()}} fails. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em glob\+\_\+str} & the glob string, containing an optional path (in which case the entire path must be readable) and a glob filename pattern\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a list of files matching the string argument or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the call to \mbox{\hyperlink{group__filesystem__functions_ga2d74de13e8fb0f3bb690647818cd068a}{glob()}} fails, in which case \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to get the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*list<string> gl = glob(\textcolor{stringliteral}{"{}*.txt"{}});}
\DoxyCodeLine{\textcolor{keywordflow}{if} (!gl)}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}failed to glob *.txt: \%s\(\backslash\)n"{}}, strerror());}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_gabb441e137499385661b294f05e1b18fe}\label{group__filesystem__functions_gabb441e137499385661b294f05e1b18fe}} 
\index{Filesystem Functions@{Filesystem Functions}!hlstat@{hlstat}}
\index{hlstat@{hlstat}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{hlstat()}{hlstat()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::hlstat (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_gada78e1111eafb0b827a3a72844042ce9}\label{group__filesystem__functions_gada78e1111eafb0b827a3a72844042ce9}} 
\index{Filesystem Functions@{Filesystem Functions}!hlstat@{hlstat}}
\index{hlstat@{hlstat}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{hlstat()}{hlstat()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_stat_info}{Stat\+Info}} $>$ Qore\+::hlstat (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns a \mbox{\hyperlink{struct_qore_1_1_stat_info}{Stat\+Info}} hash for the path argument and does not follow symbolic links; if any errors occur, \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} is returned and \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to retrieve the error number. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to retrieve information for\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a \mbox{\hyperlink{struct_qore_1_1_stat_info}{Stat\+Info}} hash providing information about the path argument, not following any symbolic links; if any errors occur (such as if the target path is not readable or the file does not exist for example), \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} is returned and \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to retrieve the error number
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*hash<StatInfo> h = hlstat(\textcolor{stringliteral}{"{}/tmp/file.txt"{}});}
\DoxyCodeLine{\textcolor{keywordflow}{if} (!exists h)}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}could not hlstat /tmp/file.txt: \%s\(\backslash\)n"{}}, strerror());}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__filesystem__functions_gae2beafb85bdfb88495f1645605a96b0a}{hstat()}} for a version of this function that follows symbolic links~\newline
~\newline
 \mbox{\hyperlink{group__filesystem__functions_ga0ac877d2d854200d4f7eed50e6a71cf5}{lstat()}} for a version of this function that returns a traditional \mbox{\hyperlink{group__filesystem__functions_stat_list}{list}} instead of a user-\/friendly \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}~\newline
~\newline
 \mbox{\hyperlink{class_qore_1_1_read_only_file_acc4469d7f06423f58d9bf4bee20765b4}{File\+::hlstat()}} for a static method in the \mbox{\hyperlink{class_qore_1_1_file}{File}} class that throws an exception instead of returning \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} when errors occur 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__filesystem__functions_gae2beafb85bdfb88495f1645605a96b0a}\label{group__filesystem__functions_gae2beafb85bdfb88495f1645605a96b0a}} 
\index{Filesystem Functions@{Filesystem Functions}!hstat@{hstat}}
\index{hstat@{hstat}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{hstat()}{hstat()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::hstat (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_ga47be77088773feba54d2185de658c9dd}\label{group__filesystem__functions_ga47be77088773feba54d2185de658c9dd}} 
\index{Filesystem Functions@{Filesystem Functions}!hstat@{hstat}}
\index{hstat@{hstat}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{hstat()}{hstat()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_stat_info}{Stat\+Info}} $>$ Qore\+::hstat (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns a \mbox{\hyperlink{struct_qore_1_1_stat_info}{Stat\+Info}} hash for the path argument, following any symbolic links; if any errors occur, \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} is returned and \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to retrieve the error number. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to retrieve information for\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a \mbox{\hyperlink{struct_qore_1_1_stat_info}{Stat\+Info}} hash providing information about the path argument, following any symbolic links; if any errors occur (such as if the target path is not readable or the file does not exist for example), \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} is returned and \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to retrieve the error number
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*hash<StatInfo> h = hstat(\textcolor{stringliteral}{"{}/tmp/file.txt"{}});}
\DoxyCodeLine{\textcolor{keywordflow}{if} (!h)}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}could not hstat /tmp/file.txt: \%s\(\backslash\)n"{}}, strerror());}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__filesystem__functions_gabb441e137499385661b294f05e1b18fe}{hlstat()}} for a version of this function that does not follow symbolic links~\newline
~\newline
 \mbox{\hyperlink{group__filesystem__functions_gaff2c972124d3a61309d62b6394ab9896}{stat()}} for a version of this function that returns a traditional \mbox{\hyperlink{group__filesystem__functions_stat_list}{list}} instead of a user-\/friendly \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}~\newline
~\newline
 \mbox{\hyperlink{class_qore_1_1_read_only_file_a649f32981a2419c6d0e335ee4b310bf1}{File\+::hstat()}} for a static method in the \mbox{\hyperlink{class_qore_1_1_file}{File}} class that throws an exception instead of returning \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} when errors occur 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__filesystem__functions_ga139846d1deedb967e21af11e62799ea2}\label{group__filesystem__functions_ga139846d1deedb967e21af11e62799ea2}} 
\index{Filesystem Functions@{Filesystem Functions}!is\_bdev@{is\_bdev}}
\index{is\_bdev@{is\_bdev}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{is\_bdev()}{is\_bdev()}}
{\footnotesize\ttfamily bool Qore\+::is\+\_\+bdev (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a block device on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a block device on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool b = is\_bdev(\textcolor{stringliteral}{"{}/tmp/sda1"{}});}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_ga56ae16710a38109b7ed71010a5b3d9e5}\label{group__filesystem__functions_ga56ae16710a38109b7ed71010a5b3d9e5}} 
\index{Filesystem Functions@{Filesystem Functions}!is\_cdev@{is\_cdev}}
\index{is\_cdev@{is\_cdev}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{is\_cdev()}{is\_cdev()}}
{\footnotesize\ttfamily bool Qore\+::is\+\_\+cdev (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a character device on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a character device on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool b = is\_cdev(\textcolor{stringliteral}{"{}/tmp/tty"{}});}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_ga594e6a60ad12517656d32a7262777b4d}\label{group__filesystem__functions_ga594e6a60ad12517656d32a7262777b4d}} 
\index{Filesystem Functions@{Filesystem Functions}!is\_dev@{is\_dev}}
\index{is\_dev@{is\_dev}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{is\_dev()}{is\_dev()}}
{\footnotesize\ttfamily bool Qore\+::is\+\_\+dev (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a device (either block or character) on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a device (either block or character) on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool b = is\_dev(\textcolor{stringliteral}{"{}/tmp/scanner"{}});}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_ga38348592b2e5aa5589e0399c10b260fd}\label{group__filesystem__functions_ga38348592b2e5aa5589e0399c10b260fd}} 
\index{Filesystem Functions@{Filesystem Functions}!is\_dir@{is\_dir}}
\index{is\_dir@{is\_dir}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{is\_dir()}{is\_dir()}}
{\footnotesize\ttfamily bool Qore\+::is\+\_\+dir (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a directory on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a directory on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool b = is\_dir(\textcolor{stringliteral}{"{}/tmp/mydir"{}});}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_ga0255009acc4b2cb332fd3f9d2aae7c05}\label{group__filesystem__functions_ga0255009acc4b2cb332fd3f9d2aae7c05}} 
\index{Filesystem Functions@{Filesystem Functions}!is\_executable@{is\_executable}}
\index{is\_executable@{is\_executable}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{is\_executable()}{is\_executable()}}
{\footnotesize\ttfamily bool Qore\+::is\+\_\+executable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies an executable on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. 

\begin{DoxyParagraph}{Platform Availability}
\mbox{\hyperlink{group__option__constants_ga0cc55debed9574104abe543102810085}{Qore\+::\+Option\+::\+HAVE\+\_\+\+IS\+\_\+\+EXECUTABLE}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies an executable on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool b = is\_executable(\textcolor{stringliteral}{"{}/bin/login"{}});}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_ga6117e36222d08c197c2c0de1cadea715}\label{group__filesystem__functions_ga6117e36222d08c197c2c0de1cadea715}} 
\index{Filesystem Functions@{Filesystem Functions}!is\_file@{is\_file}}
\index{is\_file@{is\_file}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{is\_file()}{is\_file()}}
{\footnotesize\ttfamily bool Qore\+::is\+\_\+file (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a regular file on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a regular file on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool b = is\_file(\textcolor{stringliteral}{"{}/etc/hosts"{}});}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_ga55cb552f0c56f8ff6915ec7ad6ab3cd8}\label{group__filesystem__functions_ga55cb552f0c56f8ff6915ec7ad6ab3cd8}} 
\index{Filesystem Functions@{Filesystem Functions}!is\_link@{is\_link}}
\index{is\_link@{is\_link}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{is\_link()}{is\_link()}}
{\footnotesize\ttfamily bool Qore\+::is\+\_\+link (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a symbolic link on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. 

\begin{DoxyParagraph}{Platform Availability}
\mbox{\hyperlink{group__option__constants_gaac007b653cdc3acf169c9cc76ce4a928}{Qore\+::\+Option\+::\+HAVE\+\_\+\+UNIX\+\_\+\+FILEMGT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a symbolic link on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool b = is\_link(\textcolor{stringliteral}{"{}/etc/hosts"{}});}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_ga646f8b88054dbb2004e8f47ec09aa96e}\label{group__filesystem__functions_ga646f8b88054dbb2004e8f47ec09aa96e}} 
\index{Filesystem Functions@{Filesystem Functions}!is\_pipe@{is\_pipe}}
\index{is\_pipe@{is\_pipe}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{is\_pipe()}{is\_pipe()}}
{\footnotesize\ttfamily bool Qore\+::is\+\_\+pipe (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a pipe (FIFO) on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a pipe (FIFO) on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool b = is\_pipe(\textcolor{stringliteral}{"{}/tmp/mypipe"{}});}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_gaf04a8a04f9130664f938cf7dc10dbaed}\label{group__filesystem__functions_gaf04a8a04f9130664f938cf7dc10dbaed}} 
\index{Filesystem Functions@{Filesystem Functions}!is\_readable@{is\_readable}}
\index{is\_readable@{is\_readable}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{is\_readable()}{is\_readable()}}
{\footnotesize\ttfamily bool Qore\+::is\+\_\+readable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a file or a directory readable by the current user, \mbox{\hyperlink{basic_data_types_False}{False}} if not. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a file or a directory readable by the current user, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool b = is\_readable(\textcolor{stringliteral}{"{}/etc/hosts"{}});}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_ga568996f46411f4fa0daaaa4e61d20d44}\label{group__filesystem__functions_ga568996f46411f4fa0daaaa4e61d20d44}} 
\index{Filesystem Functions@{Filesystem Functions}!is\_socket@{is\_socket}}
\index{is\_socket@{is\_socket}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{is\_socket()}{is\_socket()}}
{\footnotesize\ttfamily bool Qore\+::is\+\_\+socket (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a socket on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not. 

\begin{DoxyParagraph}{Platform Availability}
\mbox{\hyperlink{group__option__constants_gaac007b653cdc3acf169c9cc76ce4a928}{Qore\+::\+Option\+::\+HAVE\+\_\+\+UNIX\+\_\+\+FILEMGT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a socket on the filesystem, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool b = is\_socket(\textcolor{stringliteral}{"{}/tmp/X0"{}});}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_ga1f94b219bfc67a292a80cafcd2416ee5}\label{group__filesystem__functions_ga1f94b219bfc67a292a80cafcd2416ee5}} 
\index{Filesystem Functions@{Filesystem Functions}!is\_writable@{is\_writable}}
\index{is\_writable@{is\_writable}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{is\_writable()}{is\_writable()}}
{\footnotesize\ttfamily bool Qore\+::is\+\_\+writable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a file or a directory writable by the current user, \mbox{\hyperlink{basic_data_types_False}{False}} if not. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a file or a directory writable by the current user, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool b = is\_writable(\textcolor{stringliteral}{"{}/etc/hosts"{}});}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 this function works properly on Windows 
\end{DoxySince}
\mbox{\Hypertarget{group__filesystem__functions_gaa7817f6649fdd56e82c65d9f62c8a707}\label{group__filesystem__functions_gaa7817f6649fdd56e82c65d9f62c8a707}} 
\index{Filesystem Functions@{Filesystem Functions}!is\_writeable@{is\_writeable}}
\index{is\_writeable@{is\_writeable}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{is\_writeable()}{is\_writeable()}}
{\footnotesize\ttfamily bool Qore\+::is\+\_\+writeable (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a file or a directory writable by the current user (backwards-\/compatible misspelling of \mbox{\hyperlink{group__filesystem__functions_ga1f94b219bfc67a292a80cafcd2416ee5}{is\+\_\+writable()}}) 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the string passed identifies a file or a directory writable by the current user, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool b = is\_writeable(\textcolor{stringliteral}{"{}/etc/hosts"{}});}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 this function works properly on Windows 
\end{DoxySince}
\mbox{\Hypertarget{group__filesystem__functions_gaa1536aa5f9d482dd449ad3e5f53a8507}\label{group__filesystem__functions_gaa1536aa5f9d482dd449ad3e5f53a8507}} 
\index{Filesystem Functions@{Filesystem Functions}!lchown@{lchown}}
\index{lchown@{lchown}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{lchown()}{lchown()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::lchown (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path,  }\item[{softint}]{uid = {\ttfamily -\/1},  }\item[{softint}]{gid = {\ttfamily -\/1} }\end{DoxyParamCaption})}



Changes the user and group owners of a file, if the current user has permission to do so (normally only the superuser can change the user owner), does not follow symbolic links but rather operates on the symbolic link itself. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_gaac007b653cdc3acf169c9cc76ce4a928}{Qore\+::\+Option\+::\+HAVE\+\_\+\+UNIX\+\_\+\+FILEMGT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & path to the file or directory to change \\
\hline
{\em uid} & the uid of the new user owner; -\/1 means do not change user owner \\
\hline
{\em gid} & the gid of the new group owner; -\/1 means do not change group owner\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if no error occurred; -\/1 if an error occurred, in which case \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} and/or \mbox{\hyperlink{group__library__functions_gadfdbab96958d3623d431a7ab292d7e27}{strerror()}} can be used to retrieve the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (lchown(\textcolor{stringliteral}{"{}/tmp/socket"{}}, 0, 0))}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}lchown /tmp/socket: \%s\(\backslash\)n"{}}, strerror());}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__filesystem__functions_ga3c6e7029d5759c6cabfca1d7e3b27898}{chown()}} for a version of this function that follows symbolic links (ie operates on the target instead of on the link itself) 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__filesystem__functions_ga0ac877d2d854200d4f7eed50e6a71cf5}\label{group__filesystem__functions_ga0ac877d2d854200d4f7eed50e6a71cf5}} 
\index{Filesystem Functions@{Filesystem Functions}!lstat@{lstat}}
\index{lstat@{lstat}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{lstat()}{lstat()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::lstat (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_ga02983a5bb34ee0015ff4e6e6342144a2}\label{group__filesystem__functions_ga02983a5bb34ee0015ff4e6e6342144a2}} 
\index{Filesystem Functions@{Filesystem Functions}!lstat@{lstat}}
\index{lstat@{lstat}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{lstat()}{lstat()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ auto $>$ Qore\+::lstat (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns a \mbox{\hyperlink{group__filesystem__functions_stat_list}{list of file status values}} for the path argument and does not follow symbolic links; if any errors occur, \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} is returned and \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to retrieve the error number. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to retrieve information for\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a \mbox{\hyperlink{group__filesystem__functions_stat_list}{list of file status values}} for the path argument and does not follow symbolic links; if any errors occur, \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} is returned and \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to retrieve the error number 
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*list<auto> l = lstat(\textcolor{stringliteral}{"{}/tmp/file.txt"{}});}
\DoxyCodeLine{\textcolor{keywordflow}{if} (!exists l)}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}could not lstat /tmp/file.txt: \%s\(\backslash\)n"{}}, strerror());}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
on platforms without symbolic links (such as with native Windows ports, for example), this function is identical to \mbox{\hyperlink{group__filesystem__functions_gaff2c972124d3a61309d62b6394ab9896}{stat()}}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__filesystem__functions_gaff2c972124d3a61309d62b6394ab9896}{stat()}} for a version of this function that follows symbolic links~\newline
~\newline
 \mbox{\hyperlink{group__filesystem__functions_gabb441e137499385661b294f05e1b18fe}{hlstat()}} for a version of this function that returns a user-\/friendly \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}} instead of a \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}~\newline
~\newline
 \mbox{\hyperlink{class_qore_1_1_read_only_file_aebe2680d90eac6f78773106cac9e3aff}{File\+::lstat()}} for a static method in the \mbox{\hyperlink{class_qore_1_1_file}{File}} class that throws an exception instead of returning \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} when errors occur 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__filesystem__functions_ga834e1f95eb108bd6e4d564daecd68eda}\label{group__filesystem__functions_ga834e1f95eb108bd6e4d564daecd68eda}} 
\index{Filesystem Functions@{Filesystem Functions}!mkdir@{mkdir}}
\index{mkdir@{mkdir}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{mkdir()}{mkdir()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::mkdir (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path,  }\item[{softint}]{mode = {\ttfamily 0777},  }\item[{bool}]{parents = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}}} }\end{DoxyParamCaption})}



Creates a directory, optionally specifying the mode. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to the directory to create \\
\hline
{\em mode} & the file mode of the new directory (which will be AND\textquotesingle{}ed with the umask) \\
\hline
{\em parents} & if True then parent directories are created\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
if no error occurred returns 0; -\/1 if an error occurred, in which case \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} and/or \mbox{\hyperlink{group__library__functions_gadfdbab96958d3623d431a7ab292d7e27}{strerror()}} can be used to retrieve the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (mkdir(\textcolor{stringliteral}{"{}/tmp/newdir"{}}, 0755)) \{}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}mkdir /tmp/newdir: \%s\(\backslash\)n"{}}, strerror());}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__filesystem__functions_ga93887c395ed9044e39a25046ab27f7b3}{mkdir\+\_\+ex()}}
\item \mbox{\hyperlink{group__filesystem__functions_ga2061a066ab6e3c668849520e6c371d59}{umask()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}

\begin{DoxyItemize}
\item Qore 0.\+8.\+13 added the {\itshape parents} parameter
\item Qore 0.\+9.\+5 fixed error-\/handling and the return value to be sane and consistent independently of the args 
\end{DoxyItemize}
\end{DoxySince}
\mbox{\Hypertarget{group__filesystem__functions_ga93887c395ed9044e39a25046ab27f7b3}\label{group__filesystem__functions_ga93887c395ed9044e39a25046ab27f7b3}} 
\index{Filesystem Functions@{Filesystem Functions}!mkdir\_ex@{mkdir\_ex}}
\index{mkdir\_ex@{mkdir\_ex}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{mkdir\_ex()}{mkdir\_ex()}}
{\footnotesize\ttfamily nothing Qore\+::mkdir\+\_\+ex (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path,  }\item[{softint}]{mode = {\ttfamily 0777},  }\item[{bool}]{parents = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}}} }\end{DoxyParamCaption})}



Creates a directory, optionally specifying the mode; throws an exception on error. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to the directory to create \\
\hline
{\em mode} & the file mode of the new directory (which will be AND\textquotesingle{}ed with the umask) \\
\hline
{\em parents} & if True then parent directories are created\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{mkdir\_ex(\textcolor{stringliteral}{"{}/tmp/newdir"{}}, 0755);}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__filesystem__functions_ga834e1f95eb108bd6e4d564daecd68eda}{mkdir()}}
\item \mbox{\hyperlink{class_qore_1_1_dir_a9e9f05c88ac58cdbf027f8f4d8bcdc40}{Dir\+::create()}} for a similar method that will return the \mbox{\hyperlink{group__type__conversion__functions_gaf6000d64e3fe99ce81b9faaf44b2de4e}{number}} of directories created
\item \mbox{\hyperlink{group__filesystem__functions_ga2061a066ab6e3c668849520e6c371d59}{umask()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+9.\+5 
\end{DoxySince}
\mbox{\Hypertarget{group__filesystem__functions_ga637652709e0dd1c846475de2dcfc7d96}\label{group__filesystem__functions_ga637652709e0dd1c846475de2dcfc7d96}} 
\index{Filesystem Functions@{Filesystem Functions}!mkfifo@{mkfifo}}
\index{mkfifo@{mkfifo}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{mkfifo()}{mkfifo()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::mkfifo (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path,  }\item[{softint}]{mode = {\ttfamily 0600} }\end{DoxyParamCaption})}



Creates a named pipe file with an optional file mode. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_gaac007b653cdc3acf169c9cc76ce4a928}{Qore\+::\+Option\+::\+HAVE\+\_\+\+UNIX\+\_\+\+FILEMGT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to the new named pipe \\
\hline
{\em mode} & the file mode for the new named pipe\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if no error occurred; -\/1 if an error occurred, in which case \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} and/or \mbox{\hyperlink{group__library__functions_gadfdbab96958d3623d431a7ab292d7e27}{strerror()}} can be used to retrieve the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (mkfifo(\textcolor{stringliteral}{"{}/tmp/pipe"{}}))}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}mkfifo /tmp/pipe: \%s\(\backslash\)n"{}}, strerror());}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_ga5de4265158222c7dc319c901943ee3a7}\label{group__filesystem__functions_ga5de4265158222c7dc319c901943ee3a7}} 
\index{Filesystem Functions@{Filesystem Functions}!readlink@{readlink}}
\index{readlink@{readlink}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{readlink()}{readlink()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::readlink (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns the target of a symbolic link; throws an exception if an error occurs (ex\+: file does not exist or is not a symbolic link) 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_gaac007b653cdc3acf169c9cc76ce4a928}{Qore\+::\+Option\+::\+HAVE\+\_\+\+UNIX\+\_\+\+FILEMGT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to the symbolic link\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the target of the link; throws an exception if the given path is not a symbolic link (or if another error occurs)
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string str = readlink(\textcolor{stringliteral}{"{}/tmp/symbolic\_link"{}});}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em READLINK-\/\+ERROR} & Invalid arguments or a system error occured (ex\+: file does not exist or is not a symbolic link) \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__filesystem__functions_ga59c7b40bb68308943c26473b3536594d}\label{group__filesystem__functions_ga59c7b40bb68308943c26473b3536594d}} 
\index{Filesystem Functions@{Filesystem Functions}!realpath@{realpath}}
\index{realpath@{realpath}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{realpath()}{realpath()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::realpath (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns the canonicalized absolute pathname from the given path. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string realpath = realpath(path);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to process\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the corresponding absolute path with all relative references removed and all symbolic links resolved (if applicable for the current platform)
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em REALPATH-\/\+ERROR} & if an error occurs calculating the return value then this exception is thrown\\
\hline
\end{DoxyExceptions}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 
\end{DoxySince}
\mbox{\Hypertarget{group__filesystem__functions_ga4511dfd33a6baf40c66c91a4cbc9a5b4}\label{group__filesystem__functions_ga4511dfd33a6baf40c66c91a4cbc9a5b4}} 
\index{Filesystem Functions@{Filesystem Functions}!rename@{rename}}
\index{rename@{rename}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{rename()}{rename()}}
{\footnotesize\ttfamily nothing Qore\+::rename (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{old\+\_\+path,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{new\+\_\+path }\end{DoxyParamCaption})}



Renames (or moves) files or directories. Note that for this call to function properly, the Qore process must have sufficient permissions and access to the given filesystem objects or paths to execute the rename operation. 

This function does not return any value; if any errors occur, an exception is thrown.

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em old\+\_\+path} & The original path for the file to move \\
\hline
{\em new\+\_\+path} & The target path for the file\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{rename(\textcolor{stringliteral}{"{}/tmp/myfile"{}}, \textcolor{stringliteral}{"{}/tmp/myfile.txt"{}});}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em RENAME-\/\+ERROR} & empty string passed for one of the arguments or the operating system returned an error\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
Some operating systems do not allow moving files between filesystems (ex Solaris) 
\end{DoxyNote}
\mbox{\Hypertarget{group__filesystem__functions_ga56d2abad877339557cdd3c04660e77e9}\label{group__filesystem__functions_ga56d2abad877339557cdd3c04660e77e9}} 
\index{Filesystem Functions@{Filesystem Functions}!rmdir@{rmdir}}
\index{rmdir@{rmdir}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{rmdir()}{rmdir()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::rmdir (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Removes a directory. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to the directory to remove\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if no error occurred; -\/1 if an error occurred, in which case \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} and/or \mbox{\hyperlink{group__library__functions_gadfdbab96958d3623d431a7ab292d7e27}{strerror()}} can be used to retrieve the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (rmdir(\textcolor{stringliteral}{"{}/tmp/newdir"{}}))}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}rmdir /tmp/newdir: \%s\(\backslash\)n"{}}, strerror());}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_dir_a3bccdd964feba716bd0fd16347db1bb2}{Qore\+::\+Dir\+::rmdir()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__filesystem__functions_gaff2c972124d3a61309d62b6394ab9896}\label{group__filesystem__functions_gaff2c972124d3a61309d62b6394ab9896}} 
\index{Filesystem Functions@{Filesystem Functions}!stat@{stat}}
\index{stat@{stat}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{stat()}{stat()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::stat (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_gada45281a050684839af46169dff637fb}\label{group__filesystem__functions_gada45281a050684839af46169dff637fb}} 
\index{Filesystem Functions@{Filesystem Functions}!stat@{stat}}
\index{stat@{stat}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{stat()}{stat()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ auto $>$ Qore\+::stat (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns a \mbox{\hyperlink{group__filesystem__functions_stat_list}{list of file status values}} for the path argument, following any symbolic links; if any errors occur, \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} is returned and \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to retrieve the error number. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to retrieve information for\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a \mbox{\hyperlink{group__filesystem__functions_stat_list}{list of file status values}} for the path argument, following any symbolic links; if any errors occur, \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} is returned and \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to retrieve the error number
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*list<auto> l = stat(\textcolor{stringliteral}{"{}/tmp/file.txt"{}});}
\DoxyCodeLine{\textcolor{keywordflow}{if} (!exists l)}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}could not stat /tmp/file.txt: \%s\(\backslash\)n"{}}, strerror());}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__filesystem__functions_ga0ac877d2d854200d4f7eed50e6a71cf5}{lstat()}} for a version of this function that does not follow symbolic links~\newline
~\newline
 \mbox{\hyperlink{group__filesystem__functions_gae2beafb85bdfb88495f1645605a96b0a}{hstat()}} for a version of this function that returns a user-\/friendly \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}} instead of a \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}~\newline
~\newline
 \mbox{\hyperlink{class_qore_1_1_read_only_file_aeb484661ef0fdacb6a8dfe07bde4b729}{File\+::stat()}} for a static method in the \mbox{\hyperlink{class_qore_1_1_file}{File}} class that throws an exception instead of returning \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} when errors occur 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__filesystem__functions_ga85b344e9fcc98bd36fd18b5a0fe53d8c}\label{group__filesystem__functions_ga85b344e9fcc98bd36fd18b5a0fe53d8c}} 
\index{Filesystem Functions@{Filesystem Functions}!statvfs@{statvfs}}
\index{statvfs@{statvfs}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{statvfs()}{statvfs()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_filesystem_info}{Filesystem\+Info}} $>$ Qore\+::statvfs (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns a hash of filesystem status values for the file or directory path passed. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_gaa2928b4710b3dd34f7bf5a9ba52e7548}{Qore\+::\+Option\+::\+HAVE\+\_\+\+STATVFS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to the filesystem (or on the filesystem)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a \mbox{\hyperlink{struct_qore_1_1_filesystem_info}{Filesystem\+Info}} hash; or, if any errors occur, \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} is returned and \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to retrieve the error number
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*hash<FilesystemInfo> h = statvfs(\textcolor{stringliteral}{"{}/tmp"{}})}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_read_only_file_a6681ce768d279f359a4d74ab58e40a16}{File\+::statvfs()}} for a static method in the \mbox{\hyperlink{class_qore_1_1_file}{File class}} that throws an exception instead of returning \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} when errors occur 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__filesystem__functions_gae895213e0d9f207ab855e4546c791909}\label{group__filesystem__functions_gae895213e0d9f207ab855e4546c791909}} 
\index{Filesystem Functions@{Filesystem Functions}!symlink@{symlink}}
\index{symlink@{symlink}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{symlink()}{symlink()}}
{\footnotesize\ttfamily nothing Qore\+::symlink (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{old\+\_\+path,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{new\+\_\+path }\end{DoxyParamCaption})}



Creates a symbolic link to a directory path. Note that for this call to function properly, the Qore process must have sufficient permissions and access to the given filesystem path to create the symbolic link. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_gaac007b653cdc3acf169c9cc76ce4a928}{Qore\+::\+Option\+::\+HAVE\+\_\+\+UNIX\+\_\+\+FILEMGT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
This function does not return any value; if any errors occur, an exception is thrown. If the target of the symbolic link does not exist, it is not an error; the symbolic link is created anyway.


\begin{DoxyParams}{Parameters}
{\em old\+\_\+path} & The original path; the target of the link \\
\hline
{\em new\+\_\+path} & The path to the location of the new symbolic link to be created with this function call\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{symlink(\textcolor{stringliteral}{"{}/tmp/temporary-\/dir"{}}, \textcolor{stringliteral}{"{}/users/oracle/install"{}});}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SYMLINK-\/\+ERROR} & empty string passed for one of the arguments or the operating system returned an error\\
\hline
\end{DoxyExceptions}
\begin{DoxySince}{Since}
Qore 0.\+8.\+5 
\end{DoxySince}
\mbox{\Hypertarget{group__filesystem__functions_ga2061a066ab6e3c668849520e6c371d59}\label{group__filesystem__functions_ga2061a066ab6e3c668849520e6c371d59}} 
\index{Filesystem Functions@{Filesystem Functions}!umask@{umask}}
\index{umask@{umask}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{umask()}{umask()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::umask (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_gad5d35a9e2871b2163d7ff65d717ed106}\label{group__filesystem__functions_gad5d35a9e2871b2163d7ff65d717ed106}} 
\index{Filesystem Functions@{Filesystem Functions}!umask@{umask}}
\index{umask@{umask}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{umask()}{umask()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::umask (\begin{DoxyParamCaption}\item[{softint}]{mask }\end{DoxyParamCaption})}



Sets the file creation mode mask for the process and returns the previous value of the file creation mode mask. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em mask} & the new file creation mode mask for the process\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the old file creation mode mask for the process
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (umask(mask)) \{}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}\%s: \%s\(\backslash\)n"{}}, path, strerror());}
\DoxyCodeLine{\}}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_ga3e6fdb79f8eb0792ae20f1b86e695d1a}\label{group__filesystem__functions_ga3e6fdb79f8eb0792ae20f1b86e695d1a}} 
\index{Filesystem Functions@{Filesystem Functions}!unlink@{unlink}}
\index{unlink@{unlink}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{unlink()}{unlink()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::unlink (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__filesystem__functions_gaac76dbcada98d67b28a84e7296587b10}\label{group__filesystem__functions_gaac76dbcada98d67b28a84e7296587b10}} 
\index{Filesystem Functions@{Filesystem Functions}!unlink@{unlink}}
\index{unlink@{unlink}!Filesystem Functions@{Filesystem Functions}}
\doxysubsubsection{\texorpdfstring{unlink()}{unlink()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::unlink (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Deletes a file and returns 0 for success, -\/1 for error (in which case \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to get the error) 

Does not delete directories; see \mbox{\hyperlink{group__filesystem__functions_ga56d2abad877339557cdd3c04660e77e9}{rmdir()}} for a similar function that removes directories

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to the file to delete\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 for success, -\/1 for error (in which case \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} can be used to get the error)
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (unlink(path))}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}\%s: \%s\(\backslash\)n"{}}, path, strerror());}

\end{DoxyCode}
 
\end{DoxyParagraph}
