Qore Programming Language Reference Manual  0.8.13
ql_file.dox.h
1 namespace Qore {
4 
6 struct StatInfo {
10  int blksize;
12  int blocks;
16  int dev;
18  int gid;
20  int inode;
22  int mode;
26  int nlink;
28  string perm;
30  int rdev;
32  int size;
34  string type;
36  int uid;
37 };
38 };
40 namespace Qore {
42 
46  int bavail;
48  int bfree;
50  int blocks;
52  int bsize;
54  int favail;
56  int ffree;
58  int files;
60  int frsize;
62  int fsid;
64  int namemax;
65 };
66 };
67 
69 namespace Qore {
153 
155 
173 bool absolute_path(string path);
174 
176 
194 bool absolute_path_unix(string path);
195 
197 
215 bool absolute_path_windows(string path);
216 
218 
233 int chdir(string path);
234 
236 
250 int chmod(string path, softint mode);
251 
253 
274 int chown(string path, softint owner = -1, softint group = -1);
275 
277 
292 *string getcwd();
293 
295 
308 string getcwd2();
309 
311 
325 *list glob(string glob_str);
326 
328 
335 nothing glob();
336 
338 
356 *hash<StatInfo> hlstat(string path);
357 
359 
366 nothing hlstat();
367 
369 
387 *hash<StatInfo> hstat(string path);
388 
390 
397 nothing hstat();
398 
400 
415 bool is_bdev(string path);
416 
418 
433 bool is_cdev(string path);
434 
436 
451 bool is_dev(string path);
452 
454 
469 bool is_dir(string path);
470 
472 
491 bool is_executable(string path);
492 
494 
509 bool is_file(string path);
510 
512 
531 bool is_link(string path);
532 
534 
549 bool is_pipe(string path);
550 
552 
567 bool is_readable(string path);
568 
570 
589 bool is_socket(string path);
590 
592 
609 bool is_writable(string path);
610 
612 
629 bool is_writeable(string path);
630 
632 
653 int lchown(string path, softint uid = -1, softint gid = -1);
654 
656 
675 *list lstat(string path);
676 
678 
685 nothing lstat();
686 
688 
707 int mkdir(string path, softint mode = 0777, bool parents = False);
708 
710 
728 int mkfifo(string path, softint mode = 0600);
729 
731 
749 string readlink(string path);
750 
752 
768 string realpath(string path);
769 
771 
788 nothing rename(string old_path, string new_path);
789 
791 
806 int rmdir(string path);
807 
809 
827 *list stat(string path);
828 
830 
837 nothing stat();
838 
840 
858 *hash<FilesystemInfo> statvfs(string path);
859 
861 
883 nothing symlink(string old_path, string new_path);
884 
886 
899 int umask(softint mask);
900 
902 
909 nothing umask();
910 
912 
927 int unlink(string path);
928 
930 
937 nothing unlink();
938 
940 };
int files
The total number of inodes on the filesystem.
Definition: ql_file.dox.h:58
file status information hash as returned from hstat(), hlstat(), Dir::hstat(), FileLineIterator::hsta...
Definition: ql_file.dox.h:6
nothing rename(string old_path, string new_path)
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.
date date(date dt)
Returns the date passed.
bool is_link(string path)
Returns True if the string passed identifies a symbolic link on the filesystem, False if not...
string realpath(string path)
Returns the canonicalized absolute pathname from the given path.
*list stat(string path)
Returns a list of file status values for the path argument, following any symbolic links; if any erro...
string readlink(string path)
Returns the target of a symbolic link; throws an exception if an error occurs (ex: file does not exis...
*hash< StatInfo > hlstat(string path)
Returns a StatInfo hash for the path argument and does not follow symbolic links; if any errors occur...
int chmod(string path, softint mode)
Changes the mode of a file or directory.
int frsize
The size in bytes of the minimum allocation unit on the filesystem.
Definition: ql_file.dox.h:60
int size
file size in bytes
Definition: ql_file.dox.h:32
bool is_dev(string path)
Returns True if the string passed identifies a device (either block or character) on the filesystem...
bool is_pipe(string path)
Returns True if the string passed identifies a pipe (FIFO) on the filesystem, False if not...
*string getcwd()
Returns a string giving the current working directory or NOTHING if the current working directory cou...
int unlink(string path)
Deletes a file and returns 0 for success, -1 for error (in which case errno() can be used to get the ...
string type
a string giving the file type; one of: - "BLOCK-DEVICE" - "DIRECTORY" - "CHARACTER-DEVICE" - "...
Definition: ql_file.dox.h:34
int blksize
block size; may be zero if the platform&#39;s internal stat() (2) function does not provide this info ...
Definition: ql_file.dox.h:10
int gid
group ID of the owner
Definition: ql_file.dox.h:18
const False
logical False
Definition: qc_qore.dox.h:92
bool is_cdev(string path)
Returns True if the string passed identifies a character device on the filesystem, False if not.
bool absolute_path_unix(string path)
returns True if the argument is a UNIX absolute path, False if not
list list(...)
Returns an untyped list of the arguments passed at the top level.
nothing symlink(string old_path, string new_path)
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.
*hash< StatInfo > hstat(string path)
Returns a StatInfo hash for the path argument, following any symbolic links; if any errors occur...
int blocks
The total number of blocks on the filesystem (capacity in bytes = bsize * blocks) ...
Definition: ql_file.dox.h:50
string perm
a string giving UNIX-style permissions for the file (ex: "-rwxr-xr-x")
Definition: ql_file.dox.h:28
int inode
inode of the file
Definition: ql_file.dox.h:20
int mkdir(string path, softint mode=0777, bool parents=False)
Creates a directory, optionally specifying the mode.
date ctime
last change time of the file&#39;s inode
Definition: ql_file.dox.h:14
int fsid
The filesystem ID; may not be set or meaningful on all filesystems/systems: see system documentation ...
Definition: ql_file.dox.h:62
*hash< FilesystemInfo > statvfs(string path)
Returns a hash of filesystem status values for the file or directory path passed. ...
int umask(softint mask)
Sets the file creation mode mask for the process and returns the previous value of the file creation ...
bool is_executable(string path)
Returns True if the string passed identifies an executable on the filesystem, False if not...
int ffree
The total number of free inodes available to privileged users.
Definition: ql_file.dox.h:56
bool is_dir(string path)
Returns True if the string passed identifies a directory on the filesystem, False if not...
bool is_socket(string path)
Returns True if the string passed identifies a socket on the filesystem, False if not...
int chdir(string path)
Changes the current working directory for the current process.
int namemax
The maximum length in bytes of file names on the filesystem.
Definition: ql_file.dox.h:64
int nlink
number of hard links to this file
Definition: ql_file.dox.h:26
int lchown(string path, softint uid=-1, softint gid=-1)
Changes the user and group owners of a file, if the current user has permission to do so (normally on...
bool is_readable(string path)
Returns True if the string passed identifies a file or a directory readable by the current user...
int bsize
The filesystem&#39;s block size.
Definition: ql_file.dox.h:52
*list lstat(string path)
Returns a list of file status values for the path argument and does not follow symbolic links; if any...
int bfree
The total number of free indes available to privileged users (bytes = bsize * bfree) ...
Definition: ql_file.dox.h:48
int bavail
The number of free blocks available to unprivileged users (bytes = bsize * bavail) ...
Definition: ql_file.dox.h:46
int rmdir(string path)
Removes a directory.
int favail
The number of free inodes available to unprivileged users.
Definition: ql_file.dox.h:54
date mtime
last modified time of the file
Definition: ql_file.dox.h:24
int dev
device inode number the file is on
Definition: ql_file.dox.h:16
date atime
last access time of the file
Definition: ql_file.dox.h:8
*list glob(string glob_str)
Returns a list of files matching the string argument or NOTHING if the call to glob() fails...
int mkfifo(string path, softint mode=0600)
Creates a named pipe file with an optional file mode.
bool is_writable(string path)
Returns True if the string passed identifies a file or a directory writable by the current user...
int blocks
blocks allocated for the file; may be zero if the platform&#39;s internal stat() (2) function does not pr...
Definition: ql_file.dox.h:12
bool is_file(string path)
Returns True if the string passed identifies a regular file on the filesystem, False if not...
bool is_bdev(string path)
Returns True if the string passed identifies a block device on the filesystem, False if not...
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...
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:2
int mode
inode protection mode
Definition: ql_file.dox.h:22
bool is_writeable(string path)
Returns True if the string passed identifies a file or a directory writable by the current user (back...
int uid
user ID of the owner
Definition: ql_file.dox.h:36
bool absolute_path_windows(string path)
returns True if the argument is a Windows absolute path, False if not
Filesystem info hash as returned by statvfs, Dir::statvfs, and ReadOnlyFile::statvfs()".
Definition: ql_file.dox.h:44
string getcwd2()
Returns a string giving the current working directory; throws an exception if the current directory c...
int rdev
device type number
Definition: ql_file.dox.h:30
bool absolute_path(string path)
returns True if the argument is an absolute path on the current platform, False if not ...