PSPSDK 1.0+beta2
Loading...
Searching...
No Matches
pspiofilemgr_stat.h
Go to the documentation of this file.
1/*
2 * PSP Software Development Kit - https://github.com/pspdev
3 * -----------------------------------------------------------------------
4 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5 *
6 * pspiofilemgr_dirent.h - File attributes and directory entries.
7 *
8 * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
9 * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
10 * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
11 *
12 */
13
14/* Note: Some of the structures, types, and definitions in this file were
15 extrapolated from symbolic debugging information found in the Japanese
16 version of Puzzle Bobble. */
17
18#ifndef PSPIOFILEMGR_STAT_H
19#define PSPIOFILEMGR_STAT_H
20
21#include <psptypes.h>
22#include <pspkerneltypes.h>
23
26{
28 FIO_S_IFMT = 0xF000,
30 FIO_S_IFLNK = 0x4000,
32 FIO_S_IFDIR = 0x1000,
34 FIO_S_IFREG = 0x2000,
35
37 FIO_S_ISUID = 0x0800,
39 FIO_S_ISGID = 0x0400,
41 FIO_S_ISVTX = 0x0200,
42
44 FIO_S_IRWXU = 0x01C0,
46 FIO_S_IRUSR = 0x0100,
48 FIO_S_IWUSR = 0x0080,
50 FIO_S_IXUSR = 0x0040,
51
53 FIO_S_IRWXG = 0x0038,
55 FIO_S_IRGRP = 0x0020,
57 FIO_S_IWGRP = 0x0010,
59 FIO_S_IXGRP = 0x0008,
60
62 FIO_S_IRWXO = 0x0007,
64 FIO_S_IROTH = 0x0004,
66 FIO_S_IWOTH = 0x0002,
68 FIO_S_IXOTH = 0x0001,
69};
70
71// File mode checking macros
72#define FIO_S_ISLNK(m) (((m) & FIO_S_IFMT) == FIO_S_IFLNK)
73#define FIO_S_ISREG(m) (((m) & FIO_S_IFMT) == FIO_S_IFREG)
74#define FIO_S_ISDIR(m) (((m) & FIO_S_IFMT) == FIO_S_IFDIR)
75
78{
80 FIO_SO_IFMT = 0x0038, // Format mask
82 FIO_SO_IFLNK = 0x0008, // Symbolic link
84 FIO_SO_IFDIR = 0x0010, // Directory
86 FIO_SO_IFREG = 0x0020, // Regular file
87
89 FIO_SO_IROTH = 0x0004, // read
91 FIO_SO_IWOTH = 0x0002, // write
93 FIO_SO_IXOTH = 0x0001, // execute
94};
95
96// File mode checking macros
97#define FIO_SO_ISLNK(m) (((m) & FIO_SO_IFMT) == FIO_SO_IFLNK)
98#define FIO_SO_ISREG(m) (((m) & FIO_SO_IFMT) == FIO_SO_IFREG)
99#define FIO_SO_ISDIR(m) (((m) & FIO_SO_IFMT) == FIO_SO_IFDIR)
100
116
117#endif /* PSPIOFILEMGR_STAT_H */
IOFileModes
File modes, used for the st_attr parameter in SceIoStat (confirm?).
Definition pspiofilemgr_stat.h:78
@ FIO_SO_IFLNK
Symlink.
Definition pspiofilemgr_stat.h:82
@ FIO_SO_IROTH
Hidden read permission.
Definition pspiofilemgr_stat.h:89
@ FIO_SO_IFMT
Format mask.
Definition pspiofilemgr_stat.h:80
@ FIO_SO_IFDIR
Directory.
Definition pspiofilemgr_stat.h:84
@ FIO_SO_IWOTH
Hidden write permission.
Definition pspiofilemgr_stat.h:91
@ FIO_SO_IFREG
Regular file.
Definition pspiofilemgr_stat.h:86
@ FIO_SO_IXOTH
Hidden execute permission.
Definition pspiofilemgr_stat.h:93
IOAccessModes
Access modes for st_mode in SceIoStat (confirm?).
Definition pspiofilemgr_stat.h:26
@ FIO_S_ISGID
Set GID.
Definition pspiofilemgr_stat.h:39
@ FIO_S_IRUSR
Read user permission.
Definition pspiofilemgr_stat.h:46
@ FIO_S_IWGRP
Group write permission.
Definition pspiofilemgr_stat.h:57
@ FIO_S_IWOTH
Others write permission.
Definition pspiofilemgr_stat.h:66
@ FIO_S_ISVTX
Sticky.
Definition pspiofilemgr_stat.h:41
@ FIO_S_IXOTH
Others execute permission.
Definition pspiofilemgr_stat.h:68
@ FIO_S_IRWXU
User access rights mask.
Definition pspiofilemgr_stat.h:44
@ FIO_S_IFLNK
Symbolic link.
Definition pspiofilemgr_stat.h:30
@ FIO_S_IFREG
Regular file.
Definition pspiofilemgr_stat.h:34
@ FIO_S_IRGRP
Group read permission.
Definition pspiofilemgr_stat.h:55
@ FIO_S_IRWXG
Group access rights mask.
Definition pspiofilemgr_stat.h:53
@ FIO_S_IFDIR
Directory.
Definition pspiofilemgr_stat.h:32
@ FIO_S_IWUSR
Write user permission.
Definition pspiofilemgr_stat.h:48
@ FIO_S_IROTH
Others read permission.
Definition pspiofilemgr_stat.h:64
@ FIO_S_ISUID
Set UID.
Definition pspiofilemgr_stat.h:37
@ FIO_S_IFMT
Format bits mask.
Definition pspiofilemgr_stat.h:28
@ FIO_S_IXGRP
Group execute permission.
Definition pspiofilemgr_stat.h:59
@ FIO_S_IXUSR
Execute user permission.
Definition pspiofilemgr_stat.h:50
@ FIO_S_IRWXO
Others access rights mask.
Definition pspiofilemgr_stat.h:62
SceInt64 SceOff
Definition pspkerneltypes.h:35
int SceMode
Definition pspkerneltypes.h:34
Structure to hold the status information about a file.
Definition pspiofilemgr_stat.h:102
SceMode st_mode
Definition pspiofilemgr_stat.h:103
ScePspDateTime sce_st_ctime
Creation time.
Definition pspiofilemgr_stat.h:108
SceOff st_size
Size of the file in bytes.
Definition pspiofilemgr_stat.h:106
ScePspDateTime sce_st_mtime
Modification time.
Definition pspiofilemgr_stat.h:112
ScePspDateTime sce_st_atime
Access time.
Definition pspiofilemgr_stat.h:110
unsigned int st_attr
Definition pspiofilemgr_stat.h:104
unsigned int st_private[6]
Device-specific data.
Definition pspiofilemgr_stat.h:114
Definition psptypes.h:419