LibSWOC++ 1.5.14
Solid Wall of C++
Loading...
Searching...
No Matches
swoc::file::file_status Class Reference

Information about a file. More...

#include <swoc_file.h>

Collaboration diagram for swoc::file::file_status:
Collaboration graph

Public Member Functions

file_type type () const
 
mode_t mode () const
 

Protected Member Functions

void init ()
 

Protected Attributes

struct::stat _stat
 File information.
 
file_type _type = file_type::none
 

Friends

self_type status (const path &file, std::error_code &ec)
 
int file_type (const self_type &fs)
 Return the file type value.
 
uintmax_t file_size (const self_type &fs)
 Size of the file or block device.
 
bool is_regular_file (const self_type &fs)
 Check if the path is to a regular file.
 
bool is_dir (const self_type &p)
 Check if the path is to a directory.
 
bool is_char_device (const self_type &fs)
 Check if the path is to a character device.
 
bool is_block_device (const self_type &fs)
 Check if the path is to a block device.
 
bool exists (const self_type &fs)
 Check if path exists.
 
file_time_type last_write_time (file_status const &fs)
 
file_time_type access_time (file_status const &fs)
 
file_time_type status_time (file_status const &fs)
 

Detailed Description

Information about a file.

Definition at line 202 of file swoc_file.h.

Member Function Documentation

◆ init()

void swoc::file::file_status::init ( )
protected

Definition at line 62 of file swoc_file.cc.

◆ mode()

mode_t swoc::file::file_status::mode ( ) const
inline
Returns
raw file mode data.

Definition at line 500 of file swoc_file.h.

◆ type()

enum file_type swoc::file::file_status::type ( ) const
inline
Returns
File type as an enumeration.

Definition at line 495 of file swoc_file.h.

Friends And Related Symbol Documentation

◆ access_time

file_time_type access_time ( file_status const & fs)
friend
Returns
The access time for fs.

Definition at line 200 of file swoc_file.cc.

◆ exists

bool exists ( const self_type & fs)
friend

Check if path exists.

Definition at line 525 of file swoc_file.h.

◆ file_size

uintmax_t file_size ( const self_type & fs)
friend

Size of the file or block device.

Definition at line 112 of file swoc_file.cc.

◆ file_type

int file_type ( const self_type & fs)
friend

Return the file type value.

Definition at line 107 of file swoc_file.cc.

◆ is_block_device

bool is_block_device ( const self_type & fs)
friend

Check if the path is to a block device.

Definition at line 510 of file swoc_file.h.

◆ is_char_device

bool is_char_device ( const self_type & fs)
friend

Check if the path is to a character device.

Definition at line 505 of file swoc_file.h.

◆ is_dir

bool is_dir ( const self_type & p)
friend

Check if the path is to a directory.

Definition at line 520 of file swoc_file.h.

◆ is_regular_file

bool is_regular_file ( const self_type & fs)
friend

Check if the path is to a regular file.

Definition at line 515 of file swoc_file.h.

◆ last_write_time

file_time_type last_write_time ( file_status const & fs)
friend
Returns
The modified time for fs.

Definition at line 195 of file swoc_file.cc.

◆ status

self_type status ( const path & file,
std::error_code & ec )
friend

Get the status of the file at p.

Parameters
filePath to file.
ecError code return.
Returns
Status of the file.

Definition at line 92 of file swoc_file.cc.

◆ status_time

file_time_type status_time ( file_status const & fs)
friend
Returns
The status change time for fs.

Definition at line 205 of file swoc_file.cc.

Member Data Documentation

◆ _stat

struct::stat swoc::file::file_status::_stat
protected

File information.

Definition at line 213 of file swoc_file.h.

◆ _type

file_type swoc::file::file_status::_type = file_type::none
protected

Definition at line 214 of file swoc_file.h.


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