sceIoChstat bitmasks?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

sceIoChstat bitmasks?

Post by ne0h »

Can anyone post the bitmasks documentation for sceIoChstat?
I haven't found it, sorry
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

For the PS2, it's

Code: Select all

// Flags for chstat 'statmask'
#define FIO_CST_MODE    0x0001
#define FIO_CST_ATTR    0x0002
#define FIO_CST_SIZE    0x0004
#define FIO_CST_CT              0x0008
#define FIO_CST_AT              0x0010
#define FIO_CST_MT              0x0020
#define FIO_CST_PRVT    0x0040
FIO_CST_SIZE = 0x0004 is used for truncate() in PSP newlib.
I don't know if the others work.
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

Thanks!
I've see that 0x0001 is passed for file mode, 0x0008 for creation time, 0x0020 modify time, so this attrib probably works great on PSP!
Thanks!
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

Can be ORed together?
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

Test and see
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

Ok, thanks!
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

Can anyone add this to the sdk??
I think that can be usefull...
Something like this:

Code: Select all

/** sceIoChstat bitmasks */
enum IOFileStatBitmask {
    FIO_CST_MODE = 0x0001,
    FIO_CST_ATTR = 0x0002,
    FIO_CST_SIZE = 0x0004,
    FIO_CST_CT = 0x0008,
    FIO_CST_AT = 0x0010,
    FIO_CST_MT = 0x0020,
    FIO_CST_PRVT = 0x0040
};
Post Reply