Open bb010g opened 4 years ago
What fields in particular would you need from SceIoStat?
Ideally? All of them. st_mtime
, st_ctime
, & st_atime
are standard file system fields, st_size
is being returned anyways from this call and useful, st_mode
allows for making files visible to safe homebrew via the others octet (VitaShell removed that patch's functionality and doesn't let you change file permissions), and by now st_attr
is probably worth carrying through too unless it's a huge footgun to modify? st_private
looks reasonable to leave out, but I also don't know what it's used for ("Device-specific data.").
There's no way to get to these currently without either writing C or figuring out LuaJIT's FFI library, which makes me uncomfortable due to https://github.com/hyln9/vita-libdl/issues/1 being an open issue relating to void *symbol_lookup(char *module, char *symbol)
. (By the way, tossed lpp-vita's eboot_unsafe.bin.elf
into Ghidra and am chasing down where https://pastebin.com/V615iLtj was coming from; see that issue.)
is there an usage of sceIoChstat and/or doc about it? The only snippets i found about it are to fill an error on id.dat so that it gets regenerated.
There's one linked in the VitaShell commit? As for documentation, VitaSDK's Doxygen seems to cover it pretty alright; Unix's chmod(2)
is also pretty similar. https://manpage.me/index.cgi?q=chmod&sektion=2&manpath=OpenBSD+6.2
Functions that deal with file status (declared in VitaSDK's File Status Library,
<psp2/io/stat.h>
) are not exposed by LPP, specifically the functions dealing withSceIoStat
:sceIoGetstat()
,sceIoGetstatByFd()
,sceIoChstat()
, andsceIoChstatByFd()
. (TheByFd
variants would likely fold into LPP'shandle
interface, provided from functions likeSystem.getFile
).)These functions are useful for implementing file managers at least.