40 #ifndef CA_MGM_PATH_PATHINFO_HPP
41 #define CA_MGM_PATH_PATHINFO_HPP
43 #include <ca-mgm/config.h>
53 #include <sys/types.h>
60 namespace CA_MGM_NAMESPACE {
133 friend std::ostream &
operator<<( std::ostream & str, FileType obj );
152 struct stat m_statbuf_C;
176 PathInfo(
const std::string & path,
Mode initial = E_STAT );
204 std::string
toString()
const {
return m_path.toString(); }
224 int error()
const {
return m_error; }
230 void setPath(
const PathName & path );
244 void setMode( Mode mode );
259 bool stat (
const PathName & path );
273 bool lstat (
const PathName & path );
290 bool operator()(
const PathName & path );
349 FileType fileType()
const;
395 nlink_t nlink()
const;
464 mode_t uperm()
const;
472 mode_t gperm()
const;
480 mode_t operm()
const;
498 bool isPerm ( mode_t m )
const;
509 bool hasPerm( mode_t m )
const;
526 mode_t st_mode()
const;
533 mode_t userMay()
const;
542 bool userMayR()
const;
550 bool userMayW()
const;
558 bool userMayX()
const;
567 bool userMayRW()
const;
576 bool userMayRX()
const;
585 bool userMayWX()
const;
594 bool userMayRWX()
const;
633 ::off_t size()
const;
641 blksize_t blksize()
const;
649 blkcnt_t blocks()
const;
658 time_t atime()
const;
665 time_t mtime()
const;
672 time_t ctime()
const;
691 StatMode(
const mode_t & mode_r = 0 ) : _mode( mode_r ) {}
734 mode_t uperm()
const;
735 mode_t gperm()
const;
736 mode_t operm()
const;
739 bool isPerm( mode_t m )
const;
740 bool hasPerm( mode_t m )
const;
742 mode_t st_mode()
const;
788 bool insert(
const dev_t & dev_r,
const ino_t & ino_r ) {
789 return _devino[dev_r].insert( ino_r ).second;
800 #endif // CA_MGM_PATH_PATHINFO_HPP