SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::FS::Dirent Struct Referencefinal

Directory entry. More...

#include <swcdb/fs/Dirent.h>

+ Collaboration diagram for SWC::FS::Dirent:

Public Member Functions

SWC_CAN_INLINE Dirent () noexcept
 
SWC_CAN_INLINE Dirent (const char *s, int64_t mod_time, bool a_is_dir, uint64_t a_length)
 
SWC_CAN_INLINE Dirent (Dirent &&other) noexcept
 
SWC_CAN_INLINE Dirent (const Dirent &other)
 
 ~Dirent () noexcept
 
SWC_CAN_INLINE Direntoperator= (Dirent &&other) noexcept
 
Direntoperator= (const Dirent &)=delete
 
std::string to_string () const
 
SWC_CAN_INLINE size_t encoded_length () const noexcept
 
SWC_CAN_INLINE void encode (uint8_t **bufp) const
 
SWC_CAN_INLINE void decode (const uint8_t **bufp, size_t *remainp)
 

Public Attributes

std::string name
 File or Directory name. More...
 
int64_t last_modification_time
 Last modification time. More...
 
bool is_dir
 Whether a directory. More...
 
uint64_t length
 Length of file. More...
 

Detailed Description

Directory entry.

Definition at line 17 of file Dirent.h.

Constructor & Destructor Documentation

◆ Dirent() [1/4]

SWC_CAN_INLINE SWC::FS::Dirent::Dirent ( )
inlinenoexcept

Definition at line 20 of file Dirent.h.

◆ Dirent() [2/4]

SWC_CAN_INLINE SWC::FS::Dirent::Dirent ( const char *  s,
int64_t  mod_time,
bool  a_is_dir,
uint64_t  a_length 
)
inline

Definition at line 23 of file Dirent.h.

◆ Dirent() [3/4]

SWC_CAN_INLINE SWC::FS::Dirent::Dirent ( Dirent &&  other)
inlinenoexcept

Definition at line 29 of file Dirent.h.

◆ Dirent() [4/4]

SWC_CAN_INLINE SWC::FS::Dirent::Dirent ( const Dirent other)
inline

Definition at line 36 of file Dirent.h.

◆ ~Dirent()

SWC::FS::Dirent::~Dirent ( )
inlinenoexcept

Definition at line 42 of file Dirent.h.

Member Function Documentation

◆ decode()

SWC_CAN_INLINE void SWC::FS::Dirent::decode ( const uint8_t **  bufp,
size_t *  remainp 
)
inline

Definition at line 84 of file Dirent.h.

References SWC::Serialization::decode_bool(), SWC::Serialization::decode_bytes_string(), SWC::Serialization::decode_vi64(), is_dir, last_modification_time, length, and name.

+ Here is the call graph for this function:

◆ encode()

SWC_CAN_INLINE void SWC::FS::Dirent::encode ( uint8_t **  bufp) const
inline

Definition at line 75 of file Dirent.h.

References SWC::Serialization::encode_bool(), SWC::Serialization::encode_bytes(), SWC::Serialization::encode_vi64(), is_dir, last_modification_time, length, and name.

+ Here is the call graph for this function:

◆ encoded_length()

SWC_CAN_INLINE size_t SWC::FS::Dirent::encoded_length ( ) const
inlinenoexcept

Definition at line 67 of file Dirent.h.

References SWC::Serialization::encoded_length_bytes(), SWC::Serialization::encoded_length_vi64(), is_dir, last_modification_time, length, and name.

+ Here is the call graph for this function:

◆ operator=() [1/2]

Dirent& SWC::FS::Dirent::operator= ( const Dirent )
delete

◆ operator=() [2/2]

SWC_CAN_INLINE Dirent& SWC::FS::Dirent::operator= ( Dirent &&  other)
inlinenoexcept

Definition at line 45 of file Dirent.h.

References is_dir, last_modification_time, length, and name.

◆ to_string()

std::string SWC::FS::Dirent::to_string ( ) const

Definition at line 14 of file Dirent.cc.

References is_dir, last_modification_time, length, name, and SWC::Core::to_string().

+ Here is the call graph for this function:

Member Data Documentation

◆ is_dir

bool SWC::FS::Dirent::is_dir

Whether a directory.

Definition at line 60 of file Dirent.h.

Referenced by decode(), encode(), encoded_length(), operator=(), and to_string().

◆ last_modification_time

int64_t SWC::FS::Dirent::last_modification_time

Last modification time.

Definition at line 58 of file Dirent.h.

Referenced by decode(), encode(), encoded_length(), operator=(), and to_string().

◆ length

uint64_t SWC::FS::Dirent::length

Length of file.

Definition at line 62 of file Dirent.h.

Referenced by decode(), encode(), encoded_length(), operator=(), and to_string().

◆ name

std::string SWC::FS::Dirent::name

File or Directory name.

Definition at line 56 of file Dirent.h.

Referenced by decode(), encode(), encoded_length(), operator=(), and to_string().


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