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

Header file which describes the directory entry struct. More...

#include <psp2/types.h>
#include <psp2/io/stat.h>
Include dependency graph for dirent.h:

Go to the source code of this file.

Data Structures

struct  SceIoDirent

Typedefs

typedef struct SceIoDirent SceIoDirent

Functions

SceUID sceIoDopen (const char *dirname)
int sceIoDread (SceUID fd, SceIoDirent *dir)
int sceIoDclose (SceUID fd)

Detailed Description

Header file which describes the directory entry struct.

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 SceIoDirent SceIoDirent

Describes a single directory entry


Function Documentation

int sceIoDclose ( SceUID  fd)

Close an opened directory file descriptor

Parameters:
fd- Already opened file descriptor (using sceIoDopen)
Returns:
< 0 on error
SceUID sceIoDopen ( const char *  dirname)

Open a directory

Example:
 int dfd;
 dfd = sceIoDopen("device:/");
 if(dfd >= 0)
 { Do something with the file descriptor }
Parameters:
dirname- The directory to open for reading.
Returns:
If >= 0 then a valid file descriptor, otherwise a Sony error code.
int sceIoDread ( SceUID  fd,
SceIoDirent dir 
)

Reads an entry from an opened file descriptor.

Parameters:
fd- Already opened file descriptor (using sceIoDopen)
dir- Pointer to an io_dirent_t structure to hold the file information
Returns:
Read status
  • 0 - No more directory entries left
  • > 0 - More directory entired to go
  • < 0 - Error
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines