GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
file_stat Class Reference

#include "file-stat.h"

Inheritance diagram for file_stat:
Collaboration diagram for file_stat:

Public Member Functions

 file_stat (const file_stat &fs)
 
 file_stat (const std::string &n="", bool fl=true)
 
 ~file_stat (void)
 
sys::time atime (void) const
 
long blksize (void) const
 
long blocks (void) const
 
sys::time ctime (void) const
 
dev_t dev (void) const
 
std::string error (void) const
 
bool exists (void) const
 
void get_stats (bool force=false)
 
void get_stats (const std::string &n, bool force=false)
 
gid_t gid (void) const
 
ino_t ino (void) const
 
bool is_blk (void) const
 
bool is_chr (void) const
 
bool is_dir (void) const
 
bool is_fifo (void) const
 
bool is_lnk (void) const
 
bool is_newer (const sys::time &time) const
 
bool is_reg (void) const
 
bool is_sock (void) const
 
mode_t mode (void) const
 
std::string mode_as_string (void) const
 
sys::time mtime (void) const
 
nlink_t nlink (void) const
 
bool ok (void) const
 
 operator bool () const
 
file_statoperator= (const file_stat &fs)
 
dev_t rdev (void) const
 
off_t size (void) const
 
sys::time time_resolution (void) const
 
uid_t uid (void) const
 

Static Public Member Functions

static bool have_struct_stat_st_blksize (void)
 
static bool have_struct_stat_st_blocks (void)
 
static bool have_struct_stat_st_rdev (void)
 
static bool is_blk (mode_t mode)
 
static bool is_chr (mode_t mode)
 
static bool is_dir (mode_t mode)
 
static bool is_fifo (mode_t mode)
 
static bool is_lnk (mode_t mode)
 
static int is_newer (const std::string &, const sys::time &)
 
static bool is_reg (mode_t mode)
 
static bool is_sock (mode_t mode)
 

Protected Attributes

sys::time m_atime
 
long m_blksize
 
long m_blocks
 
sys::time m_ctime
 
dev_t m_dev
 
std::string m_errmsg
 
bool m_fail
 
gid_t m_gid
 
bool m_initialized
 
ino_t m_ino
 
mode_t m_mode
 
sys::time m_mtime
 
nlink_t m_nlink
 
dev_t m_rdev
 
off_t m_size
 
uid_t m_uid
 

Private Member Functions

void update_internal (bool force=false)
 

Private Attributes

std::string m_file_name
 
bool m_follow_links
 

Detailed Description

Definition at line 211 of file file-stat.h.

Constructor & Destructor Documentation

◆ file_stat() [1/2]

file_stat::file_stat ( const std::string &  n = "",
bool  fl = true 
)

Definition at line 178 of file file-stat.cc.

References m_file_name, and update_internal().

◆ file_stat() [2/2]

file_stat::file_stat ( const file_stat fs)
inline

Definition at line 221 of file file-stat.h.

◆ ~file_stat()

file_stat::~file_stat ( void  )

Definition at line 185 of file file-stat.cc.

Member Function Documentation

◆ atime()

sys::time base_file_stat::atime ( void  ) const
inlineinherited

Definition at line 130 of file file-stat.h.

◆ blksize()

long base_file_stat::blksize ( void  ) const
inlineinherited

Definition at line 136 of file file-stat.h.

◆ blocks()

long base_file_stat::blocks ( void  ) const
inlineinherited

Definition at line 137 of file file-stat.h.

◆ ctime()

sys::time base_file_stat::ctime ( void  ) const
inlineinherited

Definition at line 132 of file file-stat.h.

◆ dev()

dev_t base_file_stat::dev ( void  ) const
inlineinherited

Definition at line 121 of file file-stat.h.

◆ error()

std::string base_file_stat::error ( void  ) const
inlineinherited

Definition at line 149 of file file-stat.h.

Referenced by recursive_rmdir().

◆ exists()

bool base_file_stat::exists ( void  ) const
inlineinherited

◆ get_stats() [1/2]

void file_stat::get_stats ( bool  force = false)
inline

Definition at line 242 of file file-stat.h.

◆ get_stats() [2/2]

void file_stat::get_stats ( const std::string &  n,
bool  force = false 
)
inline

Definition at line 248 of file file-stat.h.

References n.

◆ gid()

gid_t base_file_stat::gid ( void  ) const
inlineinherited

Definition at line 126 of file file-stat.h.

◆ have_struct_stat_st_blksize()

bool base_file_stat::have_struct_stat_st_blksize ( void  )
staticinherited

Definition at line 143 of file file-stat.cc.

References octave_have_struct_stat_st_blksize().

◆ have_struct_stat_st_blocks()

bool base_file_stat::have_struct_stat_st_blocks ( void  )
staticinherited

Definition at line 149 of file file-stat.cc.

References octave_have_struct_stat_st_blocks().

◆ have_struct_stat_st_rdev()

bool base_file_stat::have_struct_stat_st_rdev ( void  )
staticinherited

Definition at line 137 of file file-stat.cc.

References octave_have_struct_stat_st_rdev().

◆ ino()

ino_t base_file_stat::ino ( void  ) const
inlineinherited

Definition at line 120 of file file-stat.h.

◆ is_blk() [1/2]

bool base_file_stat::is_blk ( mode_t  mode)
staticinherited

Definition at line 95 of file file-stat.cc.

References base_file_stat::mode(), and octave_is_blk_wrapper().

◆ is_blk() [2/2]

bool base_file_stat::is_blk ( void  ) const
inherited

Definition at line 53 of file file-stat.cc.

References base_file_stat::exists(), and base_file_stat::m_mode.

◆ is_chr() [1/2]

bool base_file_stat::is_chr ( mode_t  mode)
staticinherited

Definition at line 101 of file file-stat.cc.

References base_file_stat::mode(), and octave_is_chr_wrapper().

◆ is_chr() [2/2]

bool base_file_stat::is_chr ( void  ) const
inherited

Definition at line 59 of file file-stat.cc.

References base_file_stat::exists(), and base_file_stat::m_mode.

◆ is_dir() [1/2]

bool base_file_stat::is_dir ( mode_t  mode)
staticinherited

Definition at line 107 of file file-stat.cc.

References base_file_stat::mode(), and octave_is_dir_wrapper().

◆ is_dir() [2/2]

bool base_file_stat::is_dir ( void  ) const
inherited

Definition at line 65 of file file-stat.cc.

References base_file_stat::exists(), and base_file_stat::m_mode.

Referenced by recursive_rmdir().

◆ is_fifo() [1/2]

bool base_file_stat::is_fifo ( mode_t  mode)
staticinherited

Definition at line 113 of file file-stat.cc.

References base_file_stat::mode(), and octave_is_fifo_wrapper().

◆ is_fifo() [2/2]

bool base_file_stat::is_fifo ( void  ) const
inherited

Definition at line 71 of file file-stat.cc.

References base_file_stat::exists(), and base_file_stat::m_mode.

◆ is_lnk() [1/2]

bool base_file_stat::is_lnk ( mode_t  mode)
staticinherited

Definition at line 119 of file file-stat.cc.

References base_file_stat::mode(), and octave_is_lnk_wrapper().

◆ is_lnk() [2/2]

bool base_file_stat::is_lnk ( void  ) const
inherited

Definition at line 77 of file file-stat.cc.

References base_file_stat::exists(), and base_file_stat::m_mode.

◆ is_newer() [1/2]

int base_file_stat::is_newer ( const std::string &  file,
const sys::time &  time 
)
staticinherited

Definition at line 168 of file file-stat.cc.

References base_file_stat::is_newer().

◆ is_newer() [2/2]

bool base_file_stat::is_newer ( const sys::time &  time) const
inlineinherited

Definition at line 152 of file file-stat.h.

Referenced by base_file_stat::is_newer().

◆ is_reg() [1/2]

bool base_file_stat::is_reg ( mode_t  mode)
staticinherited

Definition at line 125 of file file-stat.cc.

References base_file_stat::mode(), and octave_is_reg_wrapper().

◆ is_reg() [2/2]

bool base_file_stat::is_reg ( void  ) const
inherited

Definition at line 83 of file file-stat.cc.

References base_file_stat::exists(), and base_file_stat::m_mode.

◆ is_sock() [1/2]

bool base_file_stat::is_sock ( mode_t  mode)
staticinherited

Definition at line 131 of file file-stat.cc.

References base_file_stat::mode(), and octave_is_sock_wrapper().

◆ is_sock() [2/2]

bool base_file_stat::is_sock ( void  ) const
inherited

Definition at line 89 of file file-stat.cc.

References base_file_stat::exists(), and base_file_stat::m_mode.

◆ mode()

mode_t base_file_stat::mode ( void  ) const
inlineinherited

◆ mode_as_string()

std::string base_file_stat::mode_as_string ( void  ) const
inherited

Definition at line 155 of file file-stat.cc.

References base_file_stat::m_mode, and octave_strmode_wrapper().

◆ mtime()

sys::time base_file_stat::mtime ( void  ) const
inlineinherited

Definition at line 131 of file file-stat.h.

◆ nlink()

nlink_t base_file_stat::nlink ( void  ) const
inlineinherited

Definition at line 123 of file file-stat.h.

◆ ok()

bool base_file_stat::ok ( void  ) const
inlineinherited

Definition at line 143 of file file-stat.h.

◆ operator bool()

base_file_stat::operator bool ( ) const
inlineinherited

Definition at line 145 of file file-stat.h.

◆ operator=()

file_stat& file_stat::operator= ( const file_stat fs)
inline

Definition at line 225 of file file-stat.h.

References m_file_name, m_follow_links, and base_file_stat::operator=().

◆ rdev()

dev_t base_file_stat::rdev ( void  ) const
inlineinherited

Definition at line 134 of file file-stat.h.

◆ size()

off_t base_file_stat::size ( void  ) const
inlineinherited

Definition at line 128 of file file-stat.h.

◆ time_resolution()

sys::time base_file_stat::time_resolution ( void  ) const
inlineinherited

Definition at line 89 of file file-stat.h.

◆ uid()

uid_t base_file_stat::uid ( void  ) const
inlineinherited

Definition at line 125 of file file-stat.h.

◆ update_internal()

Member Data Documentation

◆ m_atime

sys::time base_file_stat::m_atime
protectedinherited

◆ m_blksize

long base_file_stat::m_blksize
protectedinherited

◆ m_blocks

long base_file_stat::m_blocks
protectedinherited

◆ m_ctime

sys::time base_file_stat::m_ctime
protectedinherited

◆ m_dev

dev_t base_file_stat::m_dev
protectedinherited

◆ m_errmsg

std::string base_file_stat::m_errmsg
protectedinherited

◆ m_fail

bool base_file_stat::m_fail
protectedinherited

◆ m_file_name

std::string file_stat::m_file_name
private

Definition at line 263 of file file-stat.h.

Referenced by file_stat(), operator=(), and update_internal().

◆ m_follow_links

bool file_stat::m_follow_links
private

Definition at line 267 of file file-stat.h.

Referenced by operator=(), and update_internal().

◆ m_gid

gid_t base_file_stat::m_gid
protectedinherited

◆ m_initialized

bool base_file_stat::m_initialized
protectedinherited

◆ m_ino

ino_t base_file_stat::m_ino
protectedinherited

◆ m_mode

◆ m_mtime

sys::time base_file_stat::m_mtime
protectedinherited

◆ m_nlink

nlink_t base_file_stat::m_nlink
protectedinherited

◆ m_rdev

dev_t base_file_stat::m_rdev
protectedinherited

◆ m_size

off_t base_file_stat::m_size
protectedinherited

◆ m_uid

uid_t base_file_stat::m_uid
protectedinherited

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