zipios::FilePath(3)

πŸ“¦
version 0.1.5.9+cvs.2007.04.28 Β· 2 versions
, in ubuntu jammy

πŸ’– 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, slay
  • operator string () const β€” turn it into a string, periodt
  • FilePath operator+ (const FilePath &name) const β€” Concatenates FilePath objects.
  • FilePath filename () const β€” Returns filename of the FilePath object by pruning the path off.
  • bool exists () const
  • bool isRegular () const
  • bool isDirectory () const
  • bool isCharSpecial () const
  • bool isBlockSpecial () const
  • bool isSocket () const
  • bool 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 _checked to true, stats the path, to see if it exists and to determine what type of file it is.

πŸŽ€ Protected Attributes

  • bool _checked
  • bool _exists
  • bool _is_reg
  • bool _is_dir
  • bool _is_char
  • bool _is_block
  • bool _is_socket
  • bool _is_fifo
  • string _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

  • true If 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

  • true if the path is block special (a block device file).

Definition at line 157 of file filepath.h.


🌟 bool zipios::FilePath::isCharSpecial () const [inline]

Returns

  • true if the path is character special (a character device file).

Definition at line 150 of file filepath.h.


🌟 bool zipios::FilePath::isDirectory () const [inline]

Returns

  • true if the path is a directory.

Definition at line 143 of file filepath.h.


🌟 bool zipios::FilePath::isFifo () const [inline]

Returns

  • true if the path is a Fifo (a pipe).

Definition at line 171 of file filepath.h.


🌟 bool zipios::FilePath::isRegular () const [inline]

Returns

  • true if the path is a regular file.

Definition at line 136 of file filepath.h.


🌟 bool zipios::FilePath::isSocket () const [inline]

Returns

  • true if 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