ost::File(3)
π ost::File β the ost::File(3) page, but make it cute π
okay so bestie, this is the manual page for ost::File from GNU CommonC++, living in section 3 of the manual. It's giving "base class energy" β everything file-ish inherits from it. Let's get into it. π¦
β¨ NAME β¨
ost::File β the blueprint class for files. no cap, that's literally the whole NAME section.
πΈ SYNOPSIS πΈ
#include <file.h>
Inherited by ost::Dir, and ost::RandomFile. (yes queen, they're the children π
)
π Classes
struct _fcb
π Public Types
enum Error { errSuccess = 0, errNotOpened, errMapFailed, errInitFailed,
errOpenDenied, errOpenFailed, errOpenInUse, errReadInterrupted,
errReadIncomplete, errReadFailure, errWriteInterrupted,
errWriteIncomplete, errWriteFailure, errLockFailure, errExtended }
enum Access { accessReadOnly = O_RDONLY, accessWriteOnly = O_WRONLY,
accessReadWrite = O_RDWR }
enum Open { openReadOnly = O_RDONLY, openWriteOnly = O_WRONLY,
openReadWrite = O_RDWR, openAppend = O_WRONLY | O_APPEND, openSync =
O_RDWR, openTruncate = O_RDWR | O_TRUNC }
enum Attr { attrInvalid = 0, attrPrivate = 0400 | 0200, attrGroup =
attrPrivate | 0040 | 0020, attrPublic = attrGroup | 0004 | 0002 }
enum Mapping { mappedRead = accessReadOnly, mappedWrite =
accessWriteOnly, mappedReadWrite = accessReadWrite }
enum Complete { completionImmediate, completionDelayed,
completionDeferred }
typedef enum Error Error
typedef enum Access Access
typedef enum Open Open
typedef enum Attr Attr
typedef enum Complete Complete
typedef enum Mapping Mapping
π Static Public Member Functions
static const char * getExtension (const char *path)
static const char * getFilename (const char *path)
static char * getFilename (const char *path, char *buffer, size_t
size=64)
static char * getDirname (const char *path, char *buffer, size_t
size=256)
static char * getRealpath (const char *path, char *buffer, size_t
size=256)
π Protected Types
typedef struct ost::File::_fcb fcb_t
π Member Typedef Documentation π
the way that all of these are just the enums getting a little nickname so you can use them as types. iconic behavior honestly.
typedef enum Access ost::File::Accesstypedef enum Attr ost::File::Attrtypedef enum Complete ost::File::Completetypedef enum Error ost::File::Errortypedef struct ost::File::_fcb ost::File::fcb_t[protected]typedef enum Mapping ost::File::Mappingtypedef enum Open ost::File::Open
π Member Enumeration Documentation π
π enum ost::File::Access
Enumerator:
accessReadOnlyaccessWriteOnlyaccessReadWrite
π enum ost::File::Attr
Enumerator:
attrInvalidattrPrivateattrGroupattrPublic
π enum ost::File::Complete
Enumerator:
completionImmediatecompletionDelayedcompletionDeferred
π enum ost::File::Error
Enumerator:
errSuccesserrNotOpenederrMapFailederrInitFailederrOpenDeniederrOpenFailederrOpenInUseerrReadInterruptederrReadIncompleteerrReadFailureerrWriteInterruptederrWriteIncompleteerrWriteFailureerrLockFailureerrExtended
that's fifteen error codes bestie, we are NOT skimping on the enumeration π
π enum ost::File::Mapping
Enumerator:
mappedReadmappedWritemappedReadWrite
π enum ost::File::Open
Enumerator:
openReadOnlyopenWriteOnlyopenReadWriteopenAppendopenSyncopenTruncate
π«Ά Member Function Documentation π«Ά
All five of these are [static], so you can call them without making an object first. main character functions fr.
β static char* ost::File::getDirname (const char * path, char * buffer, size_t size = 256) [static]
β static const char* ost::File::getExtension (const char * path) [static]
β static const char* ost::File::getFilename (const char * path) [static]
β static char* ost::File::getFilename (const char * path, char * buffer, size_t size = 64) [static]
β static char* ost::File::getRealpath (const char * path, char * buffer, size_t size = 256) [static]
π Author π
Generated automatically by Doxygen for GNU CommonC++ from the source code. (not me getting auto-generated, the robots wrote my whole lore π)
and that's the whole page bestie β ost::File(3) from the GNU CommonC++ Library Functions Manual, dated Sun Dec 27 2020. slay, periodt, go read file.h πβ¨ππ¦
π¦ where this page comes from
- ubuntu jammy: libcommoncpp2-doc 1.8.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms