本文整理汇总了C++中Inode::GetCreationTime方法的典型用法代码示例。如果您正苦于以下问题:C++ Inode::GetCreationTime方法的具体用法?C++ Inode::GetCreationTime怎么用?C++ Inode::GetCreationTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Inode
的用法示例。
在下文中一共展示了Inode::GetCreationTime方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
static status_t
btrfs_read_stat(fs_volume* _volume, fs_vnode* _node, struct stat* stat)
{
Inode* inode = (Inode*)_node->private_node;
stat->st_dev = inode->GetVolume()->ID();
stat->st_ino = inode->ID();
stat->st_nlink = 1;
stat->st_blksize = BTRFS_IO_SIZE;
stat->st_uid = inode->UserID();
stat->st_gid = inode->GroupID();
stat->st_mode = inode->Mode();
stat->st_type = 0;
inode->GetAccessTime(stat->st_atim);
inode->GetModificationTime(stat->st_mtim);
inode->GetChangeTime(stat->st_ctim);
inode->GetCreationTime(stat->st_crtim);
stat->st_size = inode->Size();
stat->st_blocks = (inode->Size() + 511) / 512;
return B_OK;
}
示例2:
static status_t
ext2_read_stat(fs_volume* _volume, fs_vnode* _node, struct stat* stat)
{
Inode* inode = (Inode*)_node->private_node;
const ext2_inode& node = inode->Node();
stat->st_dev = inode->GetVolume()->ID();
stat->st_ino = inode->ID();
stat->st_nlink = node.NumLinks();
stat->st_blksize = EXT2_IO_SIZE;
stat->st_uid = node.UserID();
stat->st_gid = node.GroupID();
stat->st_mode = node.Mode();
stat->st_type = 0;
inode->GetAccessTime(&stat->st_atim);
inode->GetModificationTime(&stat->st_mtim);
inode->GetChangeTime(&stat->st_ctim);
inode->GetCreationTime(&stat->st_crtim);
stat->st_size = inode->Size();
stat->st_blocks = (inode->Size() + 511) / 512;
return B_OK;
}