Skip to content

Commit

Permalink
feat: file: add a field mode for method stat
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Nov 11, 2023
1 parent 3557c8b commit e8f1a08
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions file.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ static int __eco_file_stat(lua_State *L, struct stat *st)
}
lua_setfield(L, -2, "type");

lua_pushinteger(L, st->st_mode & 0777);
lua_setfield(L, -2, "mode");

lua_pushinteger(L, st->st_atime);
lua_setfield(L, -2, "atime");

Expand Down

0 comments on commit e8f1a08

Please sign in to comment.