QC_Dir.dox.h
namespace Qore {
struct DirStatInfo {
date atime;
int blksize;
int blocks;
date ctime;
int dev;
int gid;
int inode;
*string link;
int mode;
date mtime;
string name;
int nlink;
string perm;
int rdev;
int size;
string type;
int uid;
};
};
namespace Qore {
class Dir {
public:
bool chdir(string path);
public:
nothing chgrp(int gid);
public:
nothing chgrp(string groupname);
public:
nothing chmod(softint mode);
public:
nothing chown(int uid);
public:
nothing chown(string username);
public:
constructor(*string encoding);
public:
copy();
public:
int create(softint mode = 0777);
public:
bool exists();
public:
hash<StatInfo> hstat();
public:
list list(bool full = False);
public:
list list(string regex, softint regex_options = 0, softbool full = False);
public:
list listDirs(bool full = False);
public:
list listDirs(string regex, softint regex_options = 0, softbool full = False);
public:
list listFiles(bool full = False);
public:
list listFiles(string regex, softint regex_options = 0, softbool full = False);
public:
nothing mkdir(string subdir, softint mode = 0777);
public:
Dir openDir(string subdir, *string encoding);
public:
File openFile(string filename, int flags = O_RDONLY, int mode = 0666, *string encoding);
public:
*string path();
public:
bool removeFile(string file);
public:
nothing rmdir(string subdir);
public:
list stat();
public:
hash<FilesystemInfo> statvfs();
};
};
Qore::date
date date(date dt)
Returns the date passed.
Qore::DirStatInfo::mode
int mode
inode protection mode
Definition: QC_Dir.dox.h:24
Qore::DirStatInfo::ctime
date ctime
last change time of the file&#39;s inode
Definition: QC_Dir.dox.h:14
Qore::Dir
This class implements directory handling, file listing, creating/removing subdirectories, etc.
Definition: QC_Dir.dox.h:55
Qore::DirStatInfo::gid
int gid
group ID of the owner
Definition: QC_Dir.dox.h:18
Qore::DirStatInfo::link
*string link
symbolic link target (if present)
Definition: QC_Dir.dox.h:22
Qore::stat
*list stat(string path)
Returns a list of file status values for the path argument, following any symbolic links; if any erro...
Qore::DirStatInfo::nlink
int nlink
number of hard links to this file
Definition: QC_Dir.dox.h:30
Qore::chmod
int chmod(string path, softint mode)
Changes the mode of a file or directory.
Qore::DirStatInfo::rdev
int rdev
device type number
Definition: QC_Dir.dox.h:34
Qore::DirStatInfo::perm
string perm
a string giving UNIX-style permissions for the file (ex: "-rwxr-xr-x")
Definition: QC_Dir.dox.h:32
Qore::DirStatInfo::mtime
date mtime
last modified time of the file
Definition: QC_Dir.dox.h:26
Qore::DirStatInfo::atime
date atime
last access time of the file
Definition: QC_Dir.dox.h:8
Qore::False
const False
logical False
Definition: qc_qore.dox.h:92
Qore::DirStatInfo::dev
int dev
device inode number the file is on
Definition: QC_Dir.dox.h:16
Qore::list
list list(...)
Returns an untyped list of the arguments passed at the top level.
Qore::hstat
*hash< StatInfo > hstat(string path)
Returns a StatInfo hash for the path argument, following any symbolic links; if any errors occur...
Qore::DirStatInfo::uid
int uid
user ID of the owner
Definition: QC_Dir.dox.h:40
Qore::mkdir
int mkdir(string path, softint mode=0777, bool parents=False)
Creates a directory, optionally specifying the mode.
Qore::regex
bool regex(string str, string regex, int options=0)
Returns True if the regular expression matches the string passed, otherwise returns False...
Qore::DirStatInfo::inode
int inode
inode of the file
Definition: QC_Dir.dox.h:20
Qore::statvfs
*hash< FilesystemInfo > statvfs(string path)
Returns a hash of filesystem status values for the file or directory path passed. ...
Qore::exists
bool exists(...)
A function performing the same role as the exists operator.
Qore::DirStatInfo
file status information hash as returned by Dir::list(), Dir::listFiles(), and Dir::listDirs() if the...
Definition: QC_Dir.dox.h:6
Qore::chdir
int chdir(string path)
Changes the current working directory for the current process.
Qore::DirStatInfo::blocks
int blocks
blocks allocated for the file; may be zero if the platform&#39;s internal stat() (2) function does not pr...
Definition: QC_Dir.dox.h:12
Qore::rmdir
int rmdir(string path)
Removes a directory.
Qore::DirStatInfo::size
int size
file size in bytes
Definition: QC_Dir.dox.h:36
Qore::DirStatInfo::blksize
int blksize
block size; may be zero if the platform&#39;s internal stat() (2) function does not provide this info ...
Definition: QC_Dir.dox.h:10
Qore::O_RDONLY
const O_RDONLY
Open the file read-only.
Definition: QC_File.dox.h:760
Qore::File
The File class allows Qore programs to read, write, and create files.
Definition: QC_File.dox.h:50
Qore::DirStatInfo::type
string type
a string giving the file type; one of: - "BLOCK-DEVICE" - "DIRECTORY" - "CHARACTER-DEVICE" - "...
Definition: QC_Dir.dox.h:38
Qore::chown
int chown(string path, softint owner=-1, softint group=-1)
Changes the user and group owners of a file, if the current user has permission to do so (normally on...
Qore
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:2
Qore::DirStatInfo::name
string name
a string giving the file or directory name
Definition: QC_Dir.dox.h:28