Inheritance diagram for Ux::File:
Definition at line 37 of file uxfile.hpp.
Public Member Functions | |
File (int f=-1, const char *p=NULL, ssize_t s=-1) | |
File (const char *p, ssize_t s=-1) | |
void | set (int f=-1, char *p=NULL, ssize_t s=-1) |
void | set (char *p, ssize_t s=-1) |
ssize_t | get_size (void) const |
int | get_fd (void) const |
operator const char * () | |
void | alloc (ssize_t n=-1) |
void | free (void) |
size_t | get_max_name (const char *path="/") |
int | access (int what, bool want_throw=true) |
void | chmod (mode_t mode) |
void | chown (uid_t uid, gid_t gid) |
void | close (void) |
File | dup (void) |
File | dup2 (int fd2) |
int | fcntl (int op,...) |
void | fsync (int op=O_SYNC) |
void | lchown (uid_t uid, gid_t gid) |
void | link (const char *newpath) |
void | lockf (int op, off_t len) |
void | lstat (struct stat *buf) |
void | mkfifo (mode_t perms=PERM_FILE) |
void | mknod (mode_t mode, dev_t dev) |
void | mkstemp (void) |
void | open (int flags, mode_t perms=PERM_FILE) |
long | pathconf (int name, long default_val=-1) |
ssize_t | read (void *buf, size_t nbytes, off_t offset=-1) |
ssize_t | readlink (char *buf, size_t bufsize) |
ssize_t | readv (const struct iovec *iov, int iovcnt) |
void | rename (const char *newpath) |
off_t | seek (off_t pos, int whence) |
void | stat (struct stat *buf) |
void | statvfs (struct STATVFS_NAME *buf) |
void | symlink (const char *newpath) |
void | truncate (off_t length) |
void | unlink (void) |
void | utime (const struct utimbuf *timbuf) |
ssize_t | writev (const struct iovec *iov, int iovcnt) |
ssize_t | write (const void *buf, size_t nbytes, off_t offset=-1) |
Static Public Member Functions | |
void | pipe (File pf[2]) |
int | poll (struct pollfd fdinfo[], nfds_t nfds, int timeout=-1) |
int | pselect (int nfds, fd_set *readset, fd_set *writeset=NULL, fd_set *errorset=NULL, const struct timespec *timeout=NULL, const sigset_t *sigmask=NULL) |
int | select (int nfds, fd_set *readset, fd_set *writeset=NULL, fd_set *errorset=NULL, struct timeval *timeout=NULL) |
void | sync (void) |
Protected Attributes | |
int | fd |
const char * | path |
ssize_t | size |
|
Definition at line 44 of file uxfile.hpp. Referenced by dup(), dup2(), and get_max_name(). |
|
Definition at line 47 of file uxfile.hpp. |
|
Calls access. Definition at line 59 of file uxfile.cpp. |
|
Calls malloc to allocate the path. Definition at line 25 of file uxfile.cpp. References errno, get_max_name(), path, and size. |
|
Calls chmod or fchmod. Definition at line 71 of file uxfile.cpp. |
|
Calls chown or fchown. Definition at line 86 of file uxfile.cpp. |
|
Calls close. Definition at line 101 of file uxfile.cpp. |
|
Calls dup. Definition at line 110 of file uxfile.cpp. |
|
Calls dup2. Definition at line 122 of file uxfile.cpp. |
|
Calls fcntl. Works only if the single optional argument is an int or pointer. Definition at line 132 of file uxfile.cpp. |
|
Calls free to free the path. Definition at line 39 of file uxfile.cpp. |
|
Calls fsync or fdatasync. Definition at line 147 of file uxfile.cpp. |
|
Definition at line 64 of file uxfile.hpp. |
|
Calls pathconf to get _PC_PATH_MAX. Definition at line 49 of file uxfile.cpp. References File(). Referenced by alloc(). |
|
Definition at line 62 of file uxfile.hpp. Referenced by Ux::Process::getcwd(). |
|
Calls lchown. Definition at line 169 of file uxfile.cpp. |
|
Calls link. Definition at line 178 of file uxfile.cpp. |
|
Calls lockf. Definition at line 187 of file uxfile.cpp. |
|
Calls lstat. Definition at line 196 of file uxfile.cpp. |
|
Calls mkfifo. Definition at line 205 of file uxfile.cpp. |
|
Calls mknod. Definition at line 214 of file uxfile.cpp. |
|
Calls mkstemp. Definition at line 223 of file uxfile.cpp. |
|
Calls open. Definition at line 233 of file uxfile.cpp. |
|
Definition at line 66 of file uxfile.hpp. |
|
Calls pathconf or fpathconf, with a default value to be used if the value is unspecified. Definition at line 242 of file uxfile.cpp. |
|
Calls pipe. Definition at line 263 of file uxfile.cpp. |
|
|
|
|
|
Calls read or pread. Definition at line 300 of file uxfile.cpp. |
|
Calls readlink. Definition at line 316 of file uxfile.cpp. |
|
Calls readv. Definition at line 328 of file uxfile.cpp. |
|
Calls rename. Definition at line 340 of file uxfile.cpp. |
|
Calls lseek. Definition at line 349 of file uxfile.cpp. |
|
|
|
Definition at line 56 of file uxfile.hpp. |
|
Definition at line 50 of file uxfile.hpp. Referenced by pipe(), and Ux::Socket::socketpair(). |
|
Calls stat or fstat. Definition at line 373 of file uxfile.cpp. |
|
Calls statvfs or fstatvfs, or whatever nonportable substitute has been defined. Definition at line 388 of file uxfile.cpp. |
|
Calls symlink. Definition at line 403 of file uxfile.cpp. |
|
Calls sync. Definition at line 412 of file uxfile.cpp. |
|
Calls truncate or ftruncate. Definition at line 420 of file uxfile.cpp. |
|
Calls unlink. Definition at line 435 of file uxfile.cpp. |
|
Calls utime. Definition at line 444 of file uxfile.cpp. |
|
Calls write or pwrite. Definition at line 453 of file uxfile.cpp. |
|
Calls writev. Definition at line 469 of file uxfile.cpp. |
|
|
Definition at line 40 of file uxfile.hpp. Referenced by access(), alloc(), chmod(), chown(), free(), lchown(), link(), lstat(), Ux::Dir::mkdir(), mkfifo(), mknod(), mkstemp(), open(), pathconf(), readlink(), rename(), Ux::Dir::rmdir(), stat(), statvfs(), symlink(), truncate(), unlink(), and utime(). |
|
Definition at line 41 of file uxfile.hpp. |