pspiofilemgr_stat.h

Go to the documentation of this file.
00001 /*
00002  * PSP Software Development Kit - http://www.pspdev.org
00003  * -----------------------------------------------------------------------
00004  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
00005  *
00006  * pspiofilemgr_dirent.h - File attributes and directory entries.
00007  *
00008  * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
00009  * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
00010  * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
00011  *
00012  * $Id: pspiofilemgr_stat.h 1095 2005-09-27 21:02:16Z jim $
00013  */
00014 
00015 /* Note: Some of the structures, types, and definitions in this file were
00016    extrapolated from symbolic debugging information found in the Japanese
00017    version of Puzzle Bobble. */
00018 
00019 #ifndef PSPIOFILEMGR_STAT_H
00020 #define PSPIOFILEMGR_STAT_H
00021 
00022 #include <psptypes.h>
00023 #include <pspkerneltypes.h>
00024 
00026 enum IOAccessModes
00027 {
00029         FIO_S_IFMT              = 0xF000,
00031         FIO_S_IFLNK             = 0x4000,
00033         FIO_S_IFDIR             = 0x1000,
00035         FIO_S_IFREG             = 0x2000,
00036 
00038         FIO_S_ISUID             = 0x0800,
00040         FIO_S_ISGID             = 0x0400,
00042         FIO_S_ISVTX             = 0x0200,
00043 
00045         FIO_S_IRWXU             = 0x01C0,       
00047         FIO_S_IRUSR             = 0x0100,
00049         FIO_S_IWUSR             = 0x0080,
00051         FIO_S_IXUSR             = 0x0040,       
00052 
00054         FIO_S_IRWXG             = 0x0038,       
00056         FIO_S_IRGRP             = 0x0020,
00058         FIO_S_IWGRP             = 0x0010,
00060         FIO_S_IXGRP             = 0x0008,
00061 
00063         FIO_S_IRWXO             = 0x0007,       
00065         FIO_S_IROTH             = 0x0004,       
00067         FIO_S_IWOTH             = 0x0002,       
00069         FIO_S_IXOTH             = 0x0001,       
00070 };
00071 
00072 // File mode checking macros
00073 #define FIO_S_ISLNK(m)  (((m) & FIO_S_IFMT) == FIO_S_IFLNK)
00074 #define FIO_S_ISREG(m)  (((m) & FIO_S_IFMT) == FIO_S_IFREG)
00075 #define FIO_S_ISDIR(m)  (((m) & FIO_S_IFMT) == FIO_S_IFDIR)
00076 
00078 enum IOFileModes
00079 {
00081         FIO_SO_IFMT                     = 0x0038,               // Format mask
00083         FIO_SO_IFLNK            = 0x0008,               // Symbolic link
00085         FIO_SO_IFDIR            = 0x0010,               // Directory
00087         FIO_SO_IFREG            = 0x0020,               // Regular file
00088 
00090         FIO_SO_IROTH            = 0x0004,               // read
00092         FIO_SO_IWOTH            = 0x0002,               // write
00094         FIO_SO_IXOTH            = 0x0001,               // execute
00095 };
00096 
00097 // File mode checking macros
00098 #define FIO_SO_ISLNK(m) (((m) & FIO_SO_IFMT) == FIO_SO_IFLNK)
00099 #define FIO_SO_ISREG(m) (((m) & FIO_SO_IFMT) == FIO_SO_IFREG)
00100 #define FIO_SO_ISDIR(m) (((m) & FIO_SO_IFMT) == FIO_SO_IFDIR)
00101 
00103 typedef struct SceIoStat {
00104         SceMode                 st_mode;
00105         unsigned int    st_attr;
00107         SceOff                  st_size;
00109         ScePspDateTime  st_ctime;
00111         ScePspDateTime  st_atime;
00113         ScePspDateTime  st_mtime;
00115         unsigned int    st_private[6];
00116 } SceIoStat;
00117 
00118 #endif /* PSPIOFILEMGR_STAT_H */

Generated on Tue Jul 24 15:21:23 2007 for PSPSDK-Rev2272 by  doxygen 1.5.2