syscall.lfs improvement
tst2005 opened this issue · comments
Hello
I compared the syscall.lfs
to lua file-system (lfs
). Even there are not far to be equivalent
I found some differences. Some of them should be emulated or fixed.
I found one I'm not able to fix : about the device information returned by lfs.attributes
.
I need it to make a find
like that are able to stay on the same file system.
print( require"syscall.lfs".attributes(".","dev") )
I got a cdata (cdata<struct 1222>: 0x40e43248
).
- How to deal with it ?
- How can I get a numerical value something to identify the device ?
Any help is welcome!
Regards
Oh, currently dev
returns a type that has major
, minor
and dev
, so print(lfs.attributes(".", "dev").dev)
will work. Thats not correct for compatibility...
Oh thanks!
Now I will be able to make some compat stuff...
I think this should be fixed to be compatible..
Hello,
I made my possible to follow the luafilesystem behavior/API :
- about
lfs.attributes
andlfs.symlinkattributes
: see #227 to have a number value indev
andrdev
field and also support the table argument. - fix the case when lfs.dir raise an error : see #228
Note: the 2nd PR is made on the base of the first one, I don't know if it the best way to do...