zipios::FilePath(3)
π zipios::FilePath(3) π
okay bestie, welcome to the Library Functions Manual β¨ today's main character is zipios::FilePath from Zipios++, and honestly? she's giving path-representation excellence. grab a strawberry π, we're going in.
πΈ NAME πΈ
zipios::FilePath β FilePath represents a path to a file or directory name. that's the whole vibe. it's a little object that holds a path and knows things about it π¦
β¨ SYNOPSIS β¨
#include <filepath.h>
π«Ά Public Member Functions
FilePath (const string &path='', bool check_exists=false)β Constructor. (the glow-up moment π )FilePath & operator= (const string &rhs)β assignment, slayoperator string () constβ turn it into a string, periodtFilePath operator+ (const FilePath &name) constβ Concatenates FilePath objects.FilePath filename () constβ Returns filename of the FilePath object by pruning the path off.bool exists () constbool isRegular () constbool isDirectory () constbool isCharSpecial () constbool isBlockSpecial () constbool isSocket () constbool isFifo () const
π Protected Member Functions
void pruneTrailingSeparator ()β Prunes the trailing separator of a specified path. bye bye trailing slash πvoid check () constβ This function sets_checkedto true, stats the path, to see if it exists and to determine what type of file it is.
π Protected Attributes
bool _checkedbool _existsbool _is_regbool _is_dirbool _is_charbool _is_blockbool _is_socketbool _is_fifostring _path
π Static Protected Attributes
static const char _separator = '/'
π¦ Detailed Description π¦
FilePath represents a path to a file or directory name.
FilePath has member functions to check if the file path is a valid file system entity, and to check what kind of file system entity it is, e.g. is it a file, a directory, a pipe etc. like a little vibe check but for inodes, no cap π
Definition at line 18 of file filepath.h.
π Constructor & Destructor Documentation π
π zipios::FilePath::FilePath (const string & path = '', bool check_exists = false)
Constructor. the birth of a legend β¨
Parameters
pathβ A string representation of the path.check_existsβ If true is specified the constructor will check the existence and type of the path immidiately, instead of deferring that task until it is needed.
yes, "immidiately" is the spelling in the source, we do NOT fix other people's typos, we respect the author's journey π
Definition at line 18 of file filepath.cpp.
π Member Function Documentation π
π void zipios::FilePath::check () const [protected]
This function sets _checked to true, stats the path, to see if it exists and to determine what type of file it is. All the query functions check if _checked is true, and if it isn't they call check(). This means stat'ing is deferred until it becomes necessary. lazy girlboss energy, honestly iconic π₯
Definition at line 27 of file filepath.cpp.
π bool zipios::FilePath::exists () const [inline]
Returns
trueIf the path is a valid file system entity.
Definition at line 129 of file filepath.h.
π FilePath zipios::FilePath::filename () const [inline]
Returns filename of the FilePath object by pruning the path off. just the name, not the whole address bestie π
Definition at line 119 of file filepath.h.
π bool zipios::FilePath::isBlockSpecial () const [inline]
Returns
trueif the path is block special (a block device file).
Definition at line 157 of file filepath.h.
π bool zipios::FilePath::isCharSpecial () const [inline]
Returns
trueif the path is character special (a character device file).
Definition at line 150 of file filepath.h.
π bool zipios::FilePath::isDirectory () const [inline]
Returns
trueif the path is a directory.
Definition at line 143 of file filepath.h.
π bool zipios::FilePath::isFifo () const [inline]
Returns
trueif the path is a Fifo (a pipe).
Definition at line 171 of file filepath.h.
π bool zipios::FilePath::isRegular () const [inline]
Returns
trueif the path is a regular file.
Definition at line 136 of file filepath.h.
π bool zipios::FilePath::isSocket () const [inline]
Returns
trueif the path is a socket.
Definition at line 164 of file filepath.h.
π FilePath zipios::FilePath::operator+ (const FilePath & name) const [inline]
Concatenates FilePath objects. A file separator is inserted if appropriate. matching energy fr fr π«Ά
Definition at line 111 of file filepath.h.
π void zipios::FilePath::pruneTrailingSeparator () [inline], [protected]
Prunes the trailing separator of a specified path. βοΈ
Definition at line 100 of file filepath.h.
π Author π
Generated automatically by Doxygen for Zipios++ from the source code. (not a human, not a girlboss, just a robot doing its thing π€β¨)
aaaand that's the page bestie!! π the doc itself is from Zipios++, dated Tue Mar 24 2020, and it lives at zipios::FilePath(3) β love that for us. now go forth and stat responsibly πππ¦
π¦ where this page comes from
- ubuntu jammy: libzipios++-dev 0.1.5.9+cvs.2007.04.28-11build1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms