Convenience class for directories.
More...
#include <fsys.h>
|
|
void | close (void) |
| | Close and release directory object.
|
| |
|
| dir () |
| | Construct an unopened directory.
|
| |
| | dir (const char *path) |
| | Construct and open a directory path.
|
| |
| int | err (void) const |
| |
| void | open (const char *path) |
| | Open a directory path for reading.
|
| |
| | operator bool () const |
| | Test if file descriptor is open.
|
| |
| bool | operator! () const |
| | Test if file descriptor is closed.
|
| |
| ssize_t | read (char *buffer, size_t count) |
| | Read data from directory.
|
| |
| void | reset (void) |
| |
|
| ~dir () |
| | Close and release directory.
|
| |
|
| static int | create (const char *path, unsigned mode) |
| | Simple direct method to create a directory.
|
| |
| static int | remove (const char *path) |
| | Remove an empty directory.
|
| |
Convenience class for directories.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 743 of file fsys.h.
◆ dir()
| ucommon::dir::dir |
( |
const char * | path | ) |
|
Construct and open a directory path.
- Parameters
-
◆ create()
| static int ucommon::dir::create |
( |
const char * | path, |
|
|
unsigned | mode ) |
|
static |
Simple direct method to create a directory.
- Parameters
-
| path | of directory to create. |
| mode | of directory. |
- Returns
- error number or 0 on success.
◆ err()
| int ucommon::dir::err |
( |
void | | ) |
const |
|
inline |
◆ open()
| void ucommon::dir::open |
( |
const char * | path | ) |
|
Open a directory path for reading.
- Parameters
-
◆ operator bool()
| ucommon::dir::operator bool |
( |
| ) |
const |
|
inline |
Test if file descriptor is open.
- Returns
- true if open.
Definition at line 816 of file fsys.h.
◆ operator!()
| bool ucommon::dir::operator! |
( |
| ) |
const |
|
inline |
Test if file descriptor is closed.
- Returns
- true if closed.
Definition at line 824 of file fsys.h.
◆ read()
| ssize_t ucommon::dir::read |
( |
char * | buffer, |
|
|
size_t | count ) |
Read data from directory.
- Parameters
-
| buffer | to read into. |
| count | of bytes to read. |
- Returns
- bytes transferred, -1 if error.
◆ remove()
| static int ucommon::dir::remove |
( |
const char * | path | ) |
|
|
static |
Remove an empty directory.
- Parameters
-
- Returns
- error number or 0 on success.
◆ reset()
| void ucommon::dir::reset |
( |
void | | ) |
|
|
inline |
The documentation for this class was generated from the following file:
- /builddir/build/BUILD/commoncpp-7.0.1/inc/ucommon/fsys.h