PSP2SDK  dirty-f9e4f2d
The free SDK for PSP2
Data Structures | Defines | Typedefs | Enumerations | Functions
include/psp2/io/stat.h File Reference

Header file which describes file structures. More...

#include <psp2/types.h>
Include dependency graph for stat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SceIoStat

Defines

#define PSP2_S_ISLNK(m)   (((m) & PSP2_S_IFMT) == PSP2_S_IFLNK)
#define PSP2_S_ISREG(m)   (((m) & PSP2_S_IFMT) == PSP2_S_IFREG)
#define PSP2_S_ISDIR(m)   (((m) & PSP2_S_IFMT) == PSP2_S_IFDIR)
#define PSP2_SO_ISLNK(m)   (((m) & PSP2_SO_IFMT) == PSP2_SO_IFLNK)
#define PSP2_SO_ISREG(m)   (((m) & PSP2_SO_IFMT) == PSP2_SO_IFREG)
#define PSP2_SO_ISDIR(m)   (((m) & PSP2_SO_IFMT) == PSP2_SO_IFDIR)

Typedefs

typedef struct SceIoStat SceIoStat

Enumerations

enum  {
  PSP2_S_IFMT = 0xF000, PSP2_S_IFLNK = 0x4000, PSP2_S_IFDIR = 0x1000, PSP2_S_IFREG = 0x2000,
  PSP2_S_ISUID = 0x0800, PSP2_S_ISGID = 0x0400, PSP2_S_ISVTX = 0x0200, PSP2_S_IRWXU = 0x01C0,
  PSP2_S_IRUSR = 0x0100, PSP2_S_IWUSR = 0x0080, PSP2_S_IXUSR = 0x0040, PSP2_S_IRWXG = 0x0038,
  PSP2_S_IRGRP = 0x0020, PSP2_S_IWGRP = 0x0010, PSP2_S_IXGRP = 0x0008, PSP2_S_IRWXO = 0x0007,
  PSP2_S_IROTH = 0x0004, PSP2_S_IWOTH = 0x0002, PSP2_S_IXOTH = 0x0001
}
enum  {
  PSP2_SO_IFMT = 0x0038, PSP2_SO_IFLNK = 0x0008, PSP2_SO_IFDIR = 0x0010, PSP2_SO_IFREG = 0x0020,
  PSP2_SO_IROTH = 0x0004, PSP2_SO_IWOTH = 0x0002, PSP2_SO_IXOTH = 0x0001
}

Functions

int sceIoMkdir (const char *dir, SceMode mode)
int sceIoRmdir (const char *path)
int sceIoChdir (const char *path)
int sceIoGetstat (const char *file, SceIoStat *stat)
int sceIoChstat (const char *file, SceIoStat *stat, int bits)

Detailed Description

Header file which describes file structures.

Copyright (C) 2015 PSP2SDK Project

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.


Typedef Documentation

typedef struct SceIoStat SceIoStat

Structure to hold the status information about a file


Enumeration Type Documentation

anonymous enum

Access modes for st_mode in SceIoStat (confirm?).

Enumerator:
PSP2_S_IFMT 

Format bits mask

PSP2_S_IFLNK 

Symbolic link

PSP2_S_IFDIR 

Directory

PSP2_S_IFREG 

Regular file

PSP2_S_ISUID 

Set UID

PSP2_S_ISGID 

Set GID

PSP2_S_ISVTX 

Sticky

PSP2_S_IRWXU 

User access rights mask

PSP2_S_IRUSR 

Read user permission

PSP2_S_IWUSR 

Write user permission

PSP2_S_IXUSR 

Execute user permission

PSP2_S_IRWXG 

Group access rights mask

PSP2_S_IRGRP 

Group read permission

PSP2_S_IWGRP 

Group write permission

PSP2_S_IXGRP 

Group execute permission

PSP2_S_IRWXO 

Others access rights mask

PSP2_S_IROTH 

Others read permission

PSP2_S_IWOTH 

Others write permission

PSP2_S_IXOTH 

Others execute permission

anonymous enum

File modes, used for the st_attr parameter in SceIoStat (confirm?).

Enumerator:
PSP2_SO_IFMT 

Format mask

PSP2_SO_IFLNK 

Symlink

PSP2_SO_IFDIR 

Directory

PSP2_SO_IFREG 

Regular file

PSP2_SO_IROTH 

Hidden read permission

PSP2_SO_IWOTH 

Hidden write permission

PSP2_SO_IXOTH 

Hidden execute permission


Function Documentation

int sceIoChdir ( const char *  path)

Change the current directory.

Parameters:
path- The path to change to.
Returns:
< 0 on error.
int sceIoChstat ( const char *  file,
SceIoStat stat,
int  bits 
)

Change the status of a file.

Parameters:
file- The path to the file.
stat- A pointer to an io_stat_t structure.
bits- Bitmask defining which bits to change.
Returns:
< 0 on error.
int sceIoGetstat ( const char *  file,
SceIoStat stat 
)

Get the status of a file.

Parameters:
file- The path to the file.
stat- A pointer to an io_stat_t structure.
Returns:
< 0 on error.
int sceIoMkdir ( const char *  dir,
SceMode  mode 
)

Make a directory file

Parameters:
dir
mode- Access mode.
Returns:
Returns the value 0 if its succesful otherwise -1
int sceIoRmdir ( const char *  path)

Remove a directory file

Parameters:
path- Removes a directory file pointed by the string path
Returns:
Returns the value 0 if its succesful otherwise -1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines