Open
Description
Created time is currently getting timestamp from change time field. Funny that this is even commented in the source code :)
InodeData.h
public:
time_t accessTime; //!< Acess time.
time_t createdTime; //!< Inode info change time.
time_t modifiedTime; //!< Modification time.
InodeData.cpp
accessTime = read64Bit(endian, arr + arIndex);
arIndex += 0x0c; //4 extra bytes of nano seconds omitted.
createdTime = read64Bit(endian, arr + arIndex);
arIndex += 0x0c; //4 extra bytes of nano seconds omitted.
modifiedTime = read64Bit(endian, arr + arIndex);
arIndex += 0x0c; //4 extra bytes of nano seconds omitted.
InodeItem.cpp
//! Print time info.
std::string InodeItem::printTime() const
{
std::stringstream oss;
oss << "Change time: " << std::asctime(std::localtime(&data.createdTime));
oss << "Access time: " << std::asctime(std::localtime(&data.accessTime));
oss << "Modified time: " << std::asctime(std::localtime(&data.modifiedTime));
return oss.str();
}
We also need a new field for the created time, which should be next to modified time.
Metadata
Metadata
Assignees
Labels
No labels