Initialize a directory entry from a struct stat instance. This method is best when reading the filesystem directly. Please use InitNorm if populating a hzDirent instance from a file listing or config file. Returns: None
| Return Type | Function name | Arguments |
|---|---|---|
| void | hzDirent::InitStat | (hzString&,hzString&,stat&,) |
Declared in file: hzDirectory.h
Defined in file : hzDirectory.cpp
Function Logic:
Function body:
void hzDirent::InitStat (hzString& pardir)hzString& name, stat& fs,
{
// Initialize a directory entry from a struct stat instance. This method is best when reading the filesystem directly. Please use InitNorm if populating a
// hzDirent instance from a file listing or config file.
//
// Arguments: 1) dir The host directory
// 2) name Directory entry name
// 3) fs The supplied struct stat
//
// Returns: None
m_parent = pardir ;
m_Name = name ;
m_Inode = fs.st_ino ;
m_Size = fs.st_size ;
m_Ctime = fs.st_ctime ;
m_Mtime = fs.st_mtime ;
m_Mode = fs.st_mode ;
m_Owner = fs.st_uid ;
m_Group = fs.st_gid ;
m_Links = fs.st_nlink ;
m_Status = 0;
}