26 #if defined (HAVE_CONFIG_H)
39 #if defined (OCTAVE_USE_WINDOWS_API)
161 return std::string (buf);
197 #if defined (OCTAVE_USE_WINDOWS_API)
201 while (full_file_name.length () > 1
203 full_file_name.pop_back ();
209 static regexp pat (R
"(^\\\\[\w.-]+\\[\w\$-]+$)");
210 if ((full_file_name.length () == 2 && full_file_name[1] ==
':')
211 || (full_file_name.length () > 4 && full_file_name[0] ==
'\\'
212 && full_file_name[1] ==
'\\' && pat.
is_match (full_file_name)))
213 full_file_name.push_back (
'\\');
216 const char *cname = full_file_name.c_str ();
218 time_t sys_atime, sys_mtime, sys_ctime;
224 &sys_atime, &sys_mtime, &sys_ctime,
228 &sys_atime, &sys_mtime, &sys_ctime,
234 errmsg = std::strerror (errno);
255 time_t sys_atime, sys_mtime, sys_ctime;
260 &sys_atime, &sys_mtime, &sys_ctime,
266 errmsg = std::strerror (errno);
bool is_match(const std::string &buffer)
std::string mode_as_string(void) const
static bool have_struct_stat_st_rdev(void)
bool is_newer(const sys::time &time) const
static bool have_struct_stat_st_blocks(void)
static bool have_struct_stat_st_blksize(void)
static std::string make_absolute(const std::string &s, const std::string &dot_path=get_current_directory())
void update_internal(bool force=false)
void update_internal(bool force=false)
file_stat(const std::string &n="", bool fl=true)
std::string tilde_expand(const std::string &name)
bool octave_is_lnk_wrapper(mode_t mode)
bool octave_is_chr_wrapper(mode_t mode)
bool octave_is_fifo_wrapper(mode_t mode)
bool octave_have_struct_stat_st_rdev(void)
bool octave_have_struct_stat_st_blocks(void)
int octave_fstat_wrapper(int fid, mode_t *mode, ino_t *ino, dev_t *dev, nlink_t *nlink, uid_t *uid, gid_t *gid, off_t *size, time_t *atime, time_t *mtime, time_t *ctime, dev_t *rdev, long *blksize, long *blocks)
bool octave_is_blk_wrapper(mode_t mode)
bool octave_is_dir_wrapper(mode_t mode)
bool octave_is_reg_wrapper(mode_t mode)
int octave_lstat_wrapper(const char *lname, mode_t *mode, ino_t *ino, dev_t *dev, nlink_t *nlink, uid_t *uid, gid_t *gid, off_t *size, time_t *atime, time_t *mtime, time_t *ctime, dev_t *rdev, long *blksize, long *blocks)
bool octave_is_sock_wrapper(mode_t mode)
int octave_stat_wrapper(const char *fname, mode_t *mode, ino_t *ino, dev_t *dev, nlink_t *nlink, uid_t *uid, gid_t *gid, off_t *size, time_t *atime, time_t *mtime, time_t *ctime, dev_t *rdev, long *blksize, long *blocks)
bool octave_have_struct_stat_st_blksize(void)
void octave_strmode_wrapper(mode_t mode, char *buffer)