Directory entry. More...
#include <swcdb/fs/Dirent.h>
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 Dirent & | operator= (Dirent &&other) noexcept |
Dirent & | operator= (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... | |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inline |
|
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.
|
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.
|
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.
|
inlinenoexcept |
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().
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().
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().
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().
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().