1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 09:44:58 +00:00

Add a "stat" command to test FileHandle::stat().

This commit is contained in:
Andreas Kling 2018-10-14 23:39:11 +02:00
parent c7c957966a
commit 0286b5ea48
6 changed files with 58 additions and 23 deletions

View file

@ -36,8 +36,9 @@ int FileHandle::stat(Unix::stat* buffer)
buffer->st_uid = metadata.uid;
buffer->st_gid = metadata.gid;
buffer->st_rdev = 0; // FIXME
buffer->st_blksize = 0; // FIXME
buffer->st_blocks = 0; // FIXME
buffer->st_size = metadata.size;
buffer->st_blksize = metadata.blockSize;
buffer->st_blocks = metadata.blockCount;
buffer->st_atime = metadata.atime;
buffer->st_mtime = metadata.mtime;
buffer->st_ctime = metadata.ctime;