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

#include "file-stat.h"

Inheritance diagram for octave::sys::file_stat:
Collaboration diagram for octave::sys::file_stat:

Public Member Functions

 file_stat (const std::string &n="", bool fl=true)
 
 file_stat (const file_stat &fs)
 
 ~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

std::string errmsg
 
bool fail
 
bool initialized
 
sys::time m_atime
 
long m_blksize
 
long m_blocks
 
sys::time m_ctime
 
dev_t m_dev
 
gid_t m_gid
 
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 file_name
 
bool follow_links
 

Detailed Description

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

Constructor & Destructor Documentation

◆ file_stat() [1/2]

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

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

References file_name, and update_internal().

◆ file_stat() [2/2]

octave::sys::file_stat::file_stat ( const file_stat fs)
inline

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

◆ ~file_stat()

octave::sys::file_stat::~file_stat ( void  )

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

Member Function Documentation

◆ atime()

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

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

Referenced by mk_stat_map().

◆ blksize()

long octave::sys::base_file_stat::blksize ( void  ) const
inlineinherited

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

Referenced by mk_stat_map().

◆ blocks()

long octave::sys::base_file_stat::blocks ( void  ) const
inlineinherited

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

Referenced by mk_stat_map().

◆ ctime()

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

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

Referenced by mk_stat_map().

◆ dev()

dev_t octave::sys::base_file_stat::dev ( void  ) const
inlineinherited

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

Referenced by mk_stat_map(), and same_file_internal().

◆ error()

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

◆ exists()

◆ get_stats() [1/2]

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

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

References initialized.

◆ get_stats() [2/2]

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

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

References initialized.

◆ gid()

gid_t octave::sys::base_file_stat::gid ( void  ) const
inlineinherited

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

Referenced by mk_stat_map().

◆ have_struct_stat_st_blksize()

bool octave::sys::base_file_stat::have_struct_stat_st_blksize ( void  )
staticinherited

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

References octave_have_struct_stat_st_blksize().

Referenced by mk_stat_map().

◆ have_struct_stat_st_blocks()

bool octave::sys::base_file_stat::have_struct_stat_st_blocks ( void  )
staticinherited

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

References octave_have_struct_stat_st_blocks().

Referenced by mk_stat_map().

◆ have_struct_stat_st_rdev()

bool octave::sys::base_file_stat::have_struct_stat_st_rdev ( void  )
staticinherited

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

References octave_have_struct_stat_st_rdev().

Referenced by mk_stat_map().

◆ ino()

ino_t octave::sys::base_file_stat::ino ( void  ) const
inlineinherited

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

Referenced by mk_stat_map(), and same_file_internal().

◆ is_blk() [1/2]

bool octave::sys::base_file_stat::is_blk ( void  ) const
inherited

◆ is_blk() [2/2]

bool octave::sys::base_file_stat::is_blk ( mode_t  mode)
staticinherited

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

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

◆ is_chr() [1/2]

bool octave::sys::base_file_stat::is_chr ( void  ) const
inherited

◆ is_chr() [2/2]

bool octave::sys::base_file_stat::is_chr ( mode_t  mode)
staticinherited

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

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

◆ is_dir() [1/2]

◆ is_dir() [2/2]

bool octave::sys::base_file_stat::is_dir ( mode_t  mode)
staticinherited

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

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

◆ is_fifo() [1/2]

bool octave::sys::base_file_stat::is_fifo ( void  ) const
inherited

◆ is_fifo() [2/2]

bool octave::sys::base_file_stat::is_fifo ( mode_t  mode)
staticinherited

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

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

◆ is_lnk() [1/2]

bool octave::sys::base_file_stat::is_lnk ( void  ) const
inherited

◆ is_lnk() [2/2]

bool octave::sys::base_file_stat::is_lnk ( mode_t  mode)
staticinherited

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

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

◆ is_newer() [1/2]

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

◆ is_newer() [2/2]

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

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

References file, fs, and octave::sys::base_file_stat::is_newer().

◆ is_reg() [1/2]

bool octave::sys::base_file_stat::is_reg ( void  ) const
inherited

◆ is_reg() [2/2]

bool octave::sys::base_file_stat::is_reg ( mode_t  mode)
staticinherited

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

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

◆ is_sock() [1/2]

bool octave::sys::base_file_stat::is_sock ( void  ) const
inherited

◆ is_sock() [2/2]

bool octave::sys::base_file_stat::is_sock ( mode_t  mode)
staticinherited

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

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

◆ mode()

◆ mode_as_string()

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

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

References octave::sys::base_file_stat::m_mode, octave_strmode_wrapper(), and string.

Referenced by mk_stat_map().

◆ mtime()

◆ nlink()

nlink_t octave::sys::base_file_stat::nlink ( void  ) const
inlineinherited

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

Referenced by mk_stat_map().

◆ ok()

bool octave::sys::base_file_stat::ok ( void  ) const
inlineinherited

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

References initialized.

◆ operator bool()

octave::sys::base_file_stat::operator bool ( ) const
inlineinherited

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

◆ operator=()

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

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

References file_name, follow_links, fs, and octave::sys::base_file_stat::operator=().

◆ rdev()

dev_t octave::sys::base_file_stat::rdev ( void  ) const
inlineinherited

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

Referenced by mk_stat_map().

◆ size()

off_t octave::sys::base_file_stat::size ( void  ) const
inlineinherited

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

Referenced by mk_stat_map(), and octave::file_info::snarf_file().

◆ time_resolution()

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

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

Referenced by octave::load_path::dir_info::update().

◆ uid()

uid_t octave::sys::base_file_stat::uid ( void  ) const
inlineinherited

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

Referenced by mk_stat_map().

◆ update_internal()

Member Data Documentation

◆ errmsg

std::string octave::sys::base_file_stat::errmsg
protectedinherited

◆ fail

bool octave::sys::base_file_stat::fail
protectedinherited

◆ file_name

std::string octave::sys::file_stat::file_name
private

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

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

◆ follow_links

bool octave::sys::file_stat::follow_links
private

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

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

◆ initialized

bool octave::sys::base_file_stat::initialized
protectedinherited

◆ m_atime

sys::time octave::sys::base_file_stat::m_atime
protectedinherited

◆ m_blksize

long octave::sys::base_file_stat::m_blksize
protectedinherited

◆ m_blocks

long octave::sys::base_file_stat::m_blocks
protectedinherited

◆ m_ctime

sys::time octave::sys::base_file_stat::m_ctime
protectedinherited

◆ m_dev

dev_t octave::sys::base_file_stat::m_dev
protectedinherited

◆ m_gid

gid_t octave::sys::base_file_stat::m_gid
protectedinherited

◆ m_ino

ino_t octave::sys::base_file_stat::m_ino
protectedinherited

◆ m_mode

◆ m_mtime

sys::time octave::sys::base_file_stat::m_mtime
protectedinherited

◆ m_nlink

nlink_t octave::sys::base_file_stat::m_nlink
protectedinherited

◆ m_rdev

dev_t octave::sys::base_file_stat::m_rdev
protectedinherited

◆ m_size

off_t octave::sys::base_file_stat::m_size
protectedinherited

◆ m_uid

uid_t octave::sys::base_file_stat::m_uid
protectedinherited

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