ucommon  7.0.0
About: GNU uCommon C++ is a portable and optimized class framework for writing C++ applications that need to use threads and support concurrent synchronization, and that use sockets, XML parsing, object serialization, thread-optimized string and data structure classes, etc..
  Fossies Dox: ucommon-7.0.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

ucommon::fsys Class Reference

#include <fsys.h>

Inheritance diagram for ucommon::fsys:
[legend]

Public Types

enum  {
  OWNER_READONLY = 0400, GROUP_READONLY = 0440, PUBLIC_READONLY = 0444, OWNER_PRIVATE = 0600,
  OWNER_PUBLIC = 0644, GROUP_PRIVATE = 0660, GROUP_PUBLIC = 0664, EVERYONE = 0666,
  DIR_TEMPORARY = 01777
}
 
enum  access_t {
  RDONLY, WRONLY, REWRITE, RDWR = REWRITE,
  APPEND, SHARED, EXCLUSIVE, DEVICE,
  STREAM, RANDOM
}
 
typedef struct stat fileinfo_t
 
typedef long offset_t
 

Public Member Functions

 fsys ()
 
 fsys (fd_t handle)
 
 fsys (const fsys &descriptor)
 
 fsys (const char *path, access_t access)
 
 fsys (const char *path, unsigned permission, access_t access)
 
 ~fsys ()
 
fd_t operator* () const
 
 operator fd_t () const
 
void reset (void)
 
 operator bool () const
 
bool operator! () const
 
fsysoperator= (const fsys &descriptor)
 
fsysoperator*= (fd_t &descriptor)
 
fsysoperator= (fd_t descriptor)
 
fd_t handle (void) const
 
void set (fd_t descriptor)
 
fd_t release (void)
 
int seek (offset_t offset)
 
int drop (offset_t size=0)
 
bool is_tty (void) const
 
ssize_t read (void *buffer, size_t count)
 
ssize_t write (const void *buffer, size_t count)
 
int info (fileinfo_t *buffer)
 
int trunc (offset_t offset)
 
int sync (void)
 
void open (const char *path, access_t access)
 
void assign (fd_t descriptor)
 
void open (const char *path, unsigned mode, access_t access)
 
int close (void)
 
int err (void) const
 

Static Public Member Functions

static int remapError (void)
 
static bool is_tty (fd_t fd)
 
static int prefix (const char *path)
 
static int prefix (char *path, size_t size)
 
static stringref_t prefix (void)
 
static int info (const char *path, fileinfo_t *buffer)
 
static int erase (const char *path)
 
static int copy (const char *source, const char *target, size_t size=1024)
 
static int rename (const char *oldpath, const char *newpath)
 
static int mode (const char *path, unsigned value)
 
static bool is_exists (const char *path)
 
static bool is_readable (const char *path)
 
static bool is_writable (const char *path)
 
static bool is_executable (const char *path)
 
static bool is_file (const char *path)
 
static bool is_dir (const char *path)
 
static bool is_link (const char *path)
 
static bool is_device (const char *path)
 
static bool is_hidden (const char *path)
 
static void assign (fsys &object, fd_t descriptor)
 
static int unlink (const char *path)
 
static int link (const char *path, const char *target)
 
static int hardlink (const char *path, const char *target)
 
static int linkinfo (const char *path, char *buffer, size_t size)
 
static fd_t input (const char *path)
 
static fd_t output (const char *path)
 
static fd_t append (const char *path)
 
static void release (fd_t descriptor)
 
static int pipe (fd_t &input, fd_t &output, size_t size=0)
 
static int inherit (fd_t &descriptor, bool enable)
 
static fd_t null (void)
 
static int load (const char *path)
 
static int exec (const char *path, char **argv, char **envp=NULL)
 
static bool is_file (struct stat *inode)
 
static bool is_dir (struct stat *inode)
 
static bool is_link (struct stat *inode)
 
static bool is_dev (struct stat *inode)
 
static bool is_char (struct stat *inode)
 
static bool is_disk (struct stat *inode)
 
static bool is_sys (struct stat *inode)
 

Static Public Attributes

static const offset_t end = (offset_t)(-1)
 

Protected Attributes

fd_t fd
 
int error
 

Detailed Description

A container for generic and o/s portable threadsafe file system functions. These are based roughly on their posix equivilents. For libpth, the system calls are wrapped. The native file descriptor or handle may be used, but it is best to use "class fsys" instead because it can capture the errno of a file operation in a threadsafe and platform independent manner, including for mswindows targets.

Definition at line 125 of file fsys.h.

Member Typedef Documentation

◆ fileinfo_t

typedef struct stat ucommon::fsys::fileinfo_t

Definition at line 147 of file fsys.h.

◆ offset_t

File offset type.

Definition at line 176 of file fsys.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Most of the common chmod values are predefined.

Enumerator
OWNER_READONLY 
GROUP_READONLY 
PUBLIC_READONLY 
OWNER_PRIVATE 
OWNER_PUBLIC 
GROUP_PRIVATE 
GROUP_PUBLIC 
EVERYONE 
DIR_TEMPORARY 

Definition at line 135 of file fsys.h.

◆ access_t

Enumerated file access modes.

Enumerator
RDONLY 
WRONLY 
REWRITE 
RDWR 
APPEND 
SHARED 
EXCLUSIVE 
DEVICE 
STREAM 
RANDOM 

Definition at line 160 of file fsys.h.

Constructor & Destructor Documentation

◆ fsys() [1/5]

ucommon::fsys::fsys ( )

Construct an unattached fsys descriptor.

Definition at line 1171 of file fsys.cpp.

References error, fd, and INVALID_HANDLE_VALUE.

◆ fsys() [2/5]

ucommon::fsys::fsys ( fd_t  handle)

Contruct fsys from raw file handle.

Definition at line 1762 of file fsys.cpp.

References ucommon::dso::error.

◆ fsys() [3/5]

ucommon::fsys::fsys ( const fsys descriptor)

Copy (dup) an existing fsys descriptor.

Parameters
descriptorto copy from.

Definition at line 1061 of file fsys.cpp.

References copy(), ucommon::dup(), error, fd, and INVALID_HANDLE_VALUE.

◆ fsys() [4/5]

ucommon::fsys::fsys ( const char *  path,
access_t  access 
)

Create a fsys descriptor by opening an existing file or directory.

Parameters
pathof file to open for created descriptor.
accessmode of file.

Definition at line 1184 of file fsys.cpp.

References fd, INVALID_HANDLE_VALUE, and open().

◆ fsys() [5/5]

ucommon::fsys::fsys ( const char *  path,
unsigned  permission,
access_t  access 
)

Create a fsys descriptor by creating a file.

Parameters
pathof file to create for descriptor.
accessmode of file access.
permissionmode of file.

Definition at line 1190 of file fsys.cpp.

References fd, INVALID_HANDLE_VALUE, and open().

◆ ~fsys()

ucommon::fsys::~fsys ( )

Close and release a file descriptor.

Definition at line 1196 of file fsys.cpp.

References close().

Member Function Documentation

◆ append()

fd_t ucommon::fsys::append ( const char *  path)
static

Direct means to create or append a writable path and return descriptor.

Parameters
pathto create.
Returns
descriptor on success, invalid handle on failure.

Definition at line 844 of file fsys.cpp.

References EVERYONE.

◆ assign() [1/2]

void ucommon::fsys::assign ( fd_t  descriptor)
inline

Assign descriptor directly.

Parameters
descriptorto assign.

Definition at line 491 of file fsys.h.

Referenced by digest(), and ucommon::pipestream::open().

◆ assign() [2/2]

static void ucommon::fsys::assign ( fsys object,
fd_t  descriptor 
)
inlinestatic

Assign a descriptor directly.

Parameters
objectto assign descriptor to.
descriptorto assign.

Definition at line 501 of file fsys.h.

◆ close()

int ucommon::fsys::close ( void  )

Close a fsys resource.

Returns
error code as needed.

Definition at line 820 of file fsys.cpp.

References error, fd, INVALID_HANDLE_VALUE, and remapError().

Referenced by ucommon::filestream::close(), copy(), digest(), open(), operator*=(), operator=(), release(), scrub(), and ~fsys().

◆ copy()

int ucommon::fsys::copy ( const char *  source,
const char *  target,
size_t  size = 1024 
)
static

Copy a file.

Parameters
sourcefile.
targetfile.
sizeof buffer.
Returns
error number or 0 on success.

Definition at line 1374 of file fsys.cpp.

References buffer, close(), end, err(), GROUP_PUBLIC, ucommon::is(), open(), read(), result(), STREAM, and write().

Referenced by fsys(), and ucommon::secure::oscerts().

◆ drop()

int ucommon::fsys::drop ( offset_t  size = 0)

Drop cached data from start of file.

Parameters
sizeof region to drop or until end of file.
Returns
error number or 0 on success.

Definition at line 1110 of file fsys.cpp.

References error, fd, and remapError().

◆ erase()

int ucommon::fsys::erase ( const char *  path)
static

Erase (remove) a file only.

Parameters
pathof file.
Returns
error number or 0 on success.

Definition at line 1341 of file fsys.cpp.

References is_device(), and remapError().

Referenced by cleanup(), and scrub().

◆ err()

int ucommon::fsys::err ( void  ) const
inline

Get last error.

Returns
error number.

Definition at line 557 of file fsys.h.

References error.

Referenced by copy(), digest(), ucommon::filestream::err(), ucommon::dir::err(), scrub(), and zerofill().

◆ exec()

int ucommon::fsys::exec ( const char *  path,
char **  argv,
char **  envp = NULL 
)
static

Execute a process and get exit code.

Parameters
pathto execute.
argvlist.
optionalenv.
Returns
exit code.

Definition at line 1784 of file fsys.cpp.

References ucommon::shell::spawn(), and ucommon::shell::wait().

◆ handle()

fd_t ucommon::fsys::handle ( void  ) const
inline

Get the native system descriptor handle of the file descriptor.

Returns
native os descriptor.

Definition at line 281 of file fsys.h.

◆ hardlink()

int ucommon::fsys::hardlink ( const char *  path,
const char *  target 
)
static

Create a hard link.

Parameters
pathto create link to.
targetof link.
Returns
error number or 0 on success.

Definition at line 1252 of file fsys.cpp.

References link(), and remapError().

Referenced by link().

◆ info() [1/2]

static int ucommon::fsys::info ( const char *  path,
fileinfo_t buffer 
)
static

Stat a file.

Parameters
pathof file to stat.
bufferto save stat info.
Returns
error number or 0 on success.

◆ info() [2/2]

int ucommon::fsys::info ( fileinfo_t buffer)

Get status of open descriptor.

Parameters
bufferto save status info in.
Returns
error number or 0 on success.

Referenced by digest(), encodefile(), scrub(), and zerofill().

◆ inherit()

int ucommon::fsys::inherit ( fd_t descriptor,
bool  enable 
)
static

Changle inheritable handle. On windows this is done by creating a duplicate handle and then closing the original. Elsewhere this is done simply by setting flags.

Parameters
descriptorto modify.
enablechild process inheritence.
Returns
0 on success, error on failure.

Definition at line 1073 of file fsys.cpp.

References fd, and remapError().

Referenced by ucommon::pipestream::open().

◆ input()

fd_t ucommon::fsys::input ( const char *  path)
static

Direct means to open a read-only file path and return a descriptor.

Parameters
pathto open.
Returns
descriptor on success, invalid handle on failure.

Definition at line 834 of file fsys.cpp.

Referenced by main(), and pipe().

◆ is_char()

static bool ucommon::fsys::is_char ( struct stat *  inode)
inlinestatic

Definition at line 645 of file fsys.h.

References S_ISCHR.

◆ is_dev()

static bool ucommon::fsys::is_dev ( struct stat *  inode)
inlinestatic

Definition at line 641 of file fsys.h.

References S_ISBLK, and S_ISCHR.

Referenced by scrub().

◆ is_device()

bool ucommon::fsys::is_device ( const char *  path)
static

Test if path is a device path.

Parameters
pathto test.
Returns
true of is a device path.

Definition at line 1697 of file fsys.cpp.

References ucommon::is_dir(), and strnicmp().

Referenced by erase(), ucommon::is_device(), and ucommon::dir::remove().

◆ is_dir() [1/2]

bool ucommon::fsys::is_dir ( const char *  path)
static

Test if path is a directory.

Parameters
pathto test.
Returns
true if exists and is directory.

Definition at line 1500 of file fsys.cpp.

Referenced by dirpath(), ucommon::is_dir(), is_executable(), ucommon::DirPager::load(), main(), process(), scan(), and scrub().

◆ is_dir() [2/2]

static bool ucommon::fsys::is_dir ( struct stat *  inode)
inlinestatic

Definition at line 633 of file fsys.h.

◆ is_disk()

static bool ucommon::fsys::is_disk ( struct stat *  inode)
inlinestatic

Definition at line 649 of file fsys.h.

References S_ISBLK.

Referenced by zerofill().

◆ is_executable()

bool ucommon::fsys::is_executable ( const char *  path)
static

Test if path is executable.

Parameters
pathto test.
Returns
if true.

Definition at line 1050 of file fsys.cpp.

References is_dir().

Referenced by ucommon::is_executable().

◆ is_exists()

bool ucommon::fsys::is_exists ( const char *  path)
static

Test if path exists.

Parameters
pathto test.
Returns
if true.

Definition at line 1026 of file fsys.cpp.

Referenced by ucommon::is_exists().

◆ is_file() [1/2]

bool ucommon::fsys::is_file ( const char *  path)
static

Test if path is a file.

Parameters
pathto test.
Returns
true if exists and is file.

Definition at line 1453 of file fsys.cpp.

References S_ISREG.

Referenced by ucommon::is_file(), and process().

◆ is_file() [2/2]

static bool ucommon::fsys::is_file ( struct stat *  inode)
inlinestatic

Definition at line 629 of file fsys.h.

References S_ISREG.

◆ is_hidden()

bool ucommon::fsys::is_hidden ( const char *  path)
static

Test if path is a hidden file.

Parameters
pathto test.
Returns
true if exists and is hidden.

Definition at line 1740 of file fsys.cpp.

◆ is_link() [1/2]

bool ucommon::fsys::is_link ( const char *  path)
static

Test if path is a symlink.

Parameters
pathto test.
Returns
true if exists and is symlink.

Definition at line 1478 of file fsys.cpp.

References S_ISLNK.

Referenced by dirpath(), ucommon::is_link(), linkinfo(), scan(), scrub(), and unlink().

◆ is_link() [2/2]

static bool ucommon::fsys::is_link ( struct stat *  inode)
inlinestatic

Definition at line 637 of file fsys.h.

References S_ISLNK.

◆ is_readable()

bool ucommon::fsys::is_readable ( const char *  path)
static

Test if path readable.

Parameters
pathto test.
Returns
if true.

Definition at line 1034 of file fsys.cpp.

Referenced by ucommon::is_readable().

◆ is_sys()

static bool ucommon::fsys::is_sys ( struct stat *  inode)
inlinestatic

Definition at line 653 of file fsys.h.

References S_ISFIFO, and S_ISSOCK.

Referenced by digest(), and scrub().

◆ is_tty() [1/2]

bool ucommon::fsys::is_tty ( fd_t  fd)
static

See if the file handle is a tty device.

Returns
true if device.

Definition at line 794 of file fsys.cpp.

References fd.

◆ is_tty() [2/2]

bool ucommon::fsys::is_tty ( void  ) const

See if current file stream is a tty device.

Returns
true if device.

Definition at line 801 of file fsys.cpp.

References fd.

Referenced by encodestream(), ucommon::shell::getline(), and ucommon::shell::inkey().

◆ is_writable()

bool ucommon::fsys::is_writable ( const char *  path)
static

Test if path writable.

Parameters
pathto test.
Returns
if true.

Definition at line 1042 of file fsys.cpp.

Referenced by ucommon::is_writable().

◆ link()

int ucommon::fsys::link ( const char *  path,
const char *  target 
)
static

Create a symbolic link.

Parameters
pathto create.
targetof link.
Returns
error number or 0 on success.

Definition at line 1265 of file fsys.cpp.

References hardlink(), INVALID_HANDLE_VALUE, and remapError().

Referenced by hardlink().

◆ linkinfo()

int ucommon::fsys::linkinfo ( const char *  path,
char *  buffer,
size_t  size 
)
static

Read a symbolic link to get it's target.

Parameters
pathof link.
bufferto save target into.
sizeof buffer.

Definition at line 1210 of file fsys.cpp.

References buffer, INVALID_HANDLE_VALUE, is_link(), remapError(), and ucommon::String::set().

◆ load()

int ucommon::fsys::load ( const char *  path)
static

Load a library into memory.

Parameters
pathto plugin.
Returns
0 on success, else error.

Definition at line 1433 of file fsys.cpp.

References ucommon::dso::error, ucommon::dso::map(), ucommon::dso::ptr, and remapError().

◆ mode()

int ucommon::fsys::mode ( const char *  path,
unsigned  value 
)
static

Change file access mode.

Parameters
pathto change.
valueof mode to assign.
Returns
error number or 0 on success.

Definition at line 1019 of file fsys.cpp.

References remapError().

Referenced by seek().

◆ null()

fd_t ucommon::fsys::null ( void  )
static

Create inheritable /dev/null handle.

Returns
null device handle.

Definition at line 778 of file fsys.cpp.

Referenced by ucommon::pipestream::open().

◆ open() [1/2]

void ucommon::fsys::open ( const char *  path,
access_t  access 
)

Open a file or directory.

Parameters
pathof file to open.
accessmode of descriptor.

Definition at line 919 of file fsys.cpp.

References APPEND, close(), DEVICE, error, EXCLUSIVE, fd, INVALID_HANDLE_VALUE, O_NONBLOCK, RANDOM, RDONLY, remapError(), REWRITE, SHARED, STREAM, and WRONLY.

Referenced by copy(), digest(), fsys(), ucommon::filestream::open(), open(), scrub(), and zerofill().

◆ open() [2/2]

void ucommon::fsys::open ( const char *  path,
unsigned  mode,
access_t  access 
)

Open a file descriptor directly.

Parameters
pathof file to create.
accessmode of descriptor.
modeof file if created.

Definition at line 854 of file fsys.cpp.

References APPEND, close(), DEVICE, error, EXCLUSIVE, fd, INVALID_HANDLE_VALUE, open(), RANDOM, RDONLY, remapError(), REWRITE, SHARED, STREAM, and WRONLY.

◆ operator bool()

ucommon::fsys::operator bool ( ) const
inline

Test if file descriptor is open.

Returns
true if open.

Definition at line 246 of file fsys.h.

References INVALID_HANDLE_VALUE.

◆ operator fd_t()

ucommon::fsys::operator fd_t ( ) const
inline

Get the descriptor from the object by casting reference.

Returns
low level file handle.

Definition at line 231 of file fsys.h.

◆ operator!()

bool ucommon::fsys::operator! ( void  ) const
inline

Test if file descriptor is closed.

Returns
true if closed.

Definition at line 254 of file fsys.h.

References INVALID_HANDLE_VALUE.

◆ operator*()

fd_t ucommon::fsys::operator* ( ) const
inline

Get the descriptor from the object by pointer reference.

Returns
low level file handle.

Definition at line 223 of file fsys.h.

◆ operator*=()

fsys & ucommon::fsys::operator*= ( fd_t descriptor)

Replace current file descriptor with an external descriptor. This does not create a duplicate. The external descriptor object is marked as invalid.

Definition at line 1201 of file fsys.cpp.

References close(), fd, and INVALID_HANDLE_VALUE.

◆ operator=() [1/2]

fsys & ucommon::fsys::operator= ( const fsys descriptor)

Assign file descriptor by duplicating another descriptor.

Parameters
descriptorto dup from.

Definition at line 1099 of file fsys.cpp.

References close(), ucommon::dup(), error, fd, INVALID_HANDLE_VALUE, and remapError().

◆ operator=() [2/2]

fsys & ucommon::fsys::operator= ( fd_t  descriptor)

Assing file descriptor from system descriptor.

Parameters
descriptorto dup from.

Definition at line 1088 of file fsys.cpp.

References close(), ucommon::dup(), error, fd, INVALID_HANDLE_VALUE, and remapError().

◆ output()

fd_t ucommon::fsys::output ( const char *  path)
static

Direct means to create or access a writable path and return descriptor.

Parameters
pathto create.
Returns
descriptor on success, invalid handle on failure.

Definition at line 839 of file fsys.cpp.

References EVERYONE.

Referenced by main(), and pipe().

◆ pipe()

int ucommon::fsys::pipe ( fd_t input,
fd_t output,
size_t  size = 0 
)
static

Create pipe. These are created inheritable by default.

Parameters
inputdescriptor.
outputdescriptor.
sizeof buffer if supported.
Returns
0 or error code.

Definition at line 783 of file fsys.cpp.

References input(), output(), and remapError().

Referenced by ucommon::pipestream::open().

◆ prefix() [1/3]

int ucommon::fsys::prefix ( char *  path,
size_t  size 
)
static

Get current directory prefix (pwd).

Parameters
pathto save directory into.
sizeof path we can save.
Returns
error number or 0 on success.

Definition at line 1012 of file fsys.cpp.

References remapError().

◆ prefix() [2/3]

int ucommon::fsys::prefix ( const char *  path)
static

Set directory prefix (chdir).

Parameters
pathto change to.
Returns
error number or 0 on success.

Definition at line 1005 of file fsys.cpp.

References remapError().

◆ prefix() [3/3]

stringref_t ucommon::fsys::prefix ( void  )
static

◆ read()

ssize_t ucommon::fsys::read ( void *  buffer,
size_t  count 
)

Read data from descriptor or scan directory.

Parameters
bufferto read into.
countof bytes to read.
Returns
bytes transferred, -1 if error.

Definition at line 750 of file fsys.cpp.

References error, fd, and remapError().

Referenced by copy(), digest(), ucommon::temporary< uint8_t * >::read(), ucommon::pipestream::underflow(), and ucommon::filestream::underflow().

◆ release() [1/2]

void ucommon::fsys::release ( fd_t  descriptor)
static

Release a file descriptor.

Parameters
descriptorto release.

Definition at line 849 of file fsys.cpp.

References close(), and fd.

◆ release() [2/2]

fd_t ucommon::fsys::release ( void  )

Release descriptor, do not close.

Returns
handle being released.

Definition at line 1775 of file fsys.cpp.

References ucommon::dso::error, and INVALID_HANDLE_VALUE.

Referenced by ucommon::pipestream::open(), and ucommon::pipestream::release().

◆ remapError()

◆ rename()

int ucommon::fsys::rename ( const char *  oldpath,
const char *  newpath 
)
static

Rename a file.

Parameters
oldpathto rename from.
newpathto rename to.
Returns
error number or 0 on success.

Definition at line 1426 of file fsys.cpp.

References remapError().

◆ reset()

void ucommon::fsys::reset ( void  )
inline

Reset error flag.

Definition at line 238 of file fsys.h.

References error.

Referenced by ucommon::dir::reset().

◆ seek()

int ucommon::fsys::seek ( offset_t  offset)

Set the position of a file descriptor.

Parameters
offsetfrom start of file or "end" to append.
Returns
error number or 0 on success.

Definition at line 1124 of file fsys.cpp.

References end, error, fd, mode(), and remapError().

Referenced by ucommon::filestream::rewind(), scrub(), ucommon::filestream::seek(), trunc(), and zerofill().

◆ set()

void ucommon::fsys::set ( fd_t  descriptor)

Set with external descriptor. Closes existing file if open.

Parameters
descriptorof open file.

Definition at line 1768 of file fsys.cpp.

References ucommon::dso::error.

◆ sync()

int ucommon::fsys::sync ( void  )

Commit changes to the filesystem.

Returns
error number or 0 on success.

Definition at line 759 of file fsys.cpp.

References error, fd, and remapError().

◆ trunc()

int ucommon::fsys::trunc ( offset_t  offset)

Truncate file to specified length. The file pointer is positioned to the new end of file.

Parameters
offsetto truncate to.
Returns
true if truncate successful.

Definition at line 987 of file fsys.cpp.

References remapError(), and seek().

Referenced by scrub().

◆ unlink()

int ucommon::fsys::unlink ( const char *  path)
static

Remove a symbolic link explicitly. Other kinds of files are also deleted. This should be used when uncertain about symlinks requiring special support.

Parameters
pathto remove.
Returns
error number or 0 on success.

Definition at line 1314 of file fsys.cpp.

References INVALID_HANDLE_VALUE, is_link(), and remapError().

Referenced by scrub().

◆ write()

ssize_t ucommon::fsys::write ( const void *  buffer,
size_t  count 
)

Write data to descriptor.

Parameters
bufferto write from.
countof bytes to write.
Returns
bytes transferred, -1 if error.

Definition at line 769 of file fsys.cpp.

References error, fd, and remapError().

Referenced by copy(), ucommon::pipestream::overflow(), ucommon::filestream::overflow(), scrub(), ucommon::temporary< uint8_t * >::write(), and zerofill().

Member Data Documentation

◆ end

const fsys::offset_t ucommon::fsys::end = (offset_t)(-1)
static

Used to mark "append" in set position operations.

Definition at line 181 of file fsys.h.

Referenced by copy(), and seek().

◆ error

int ucommon::fsys::error
mutableprotected

◆ fd

fd_t ucommon::fsys::fd
protected

Definition at line 128 of file fsys.h.

Referenced by close(), drop(), fsys(), inherit(), is_tty(), open(), operator*=(), operator=(), read(), release(), seek(), sync(), and write().


The documentation for this class was generated from the following files: