RetroArch
Classes | Macros | Enumerations | Functions
directory.h File Reference
#include <sys/stat.h>
#include <sys/syslimits.h>
#include "common.h"
#include "partition.h"
Include dependency graph for directory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DIR_ENTRY_POSITION
 
struct  DIR_ENTRY
 

Macros

#define DIR_ENTRY_DATA_SIZE   0x20
 
#define MAX_LFN_LENGTH   256
 
#define MAX_ALIAS_LENGTH   13
 
#define LFN_ENTRY_LENGTH   13
 
#define ALIAS_ENTRY_LENGTH   11
 
#define MAX_ALIAS_EXT_LENGTH   3
 
#define MAX_ALIAS_PRI_LENGTH   8
 
#define MAX_NUMERIC_TAIL   999999
 
#define FAT16_ROOT_DIR_CLUSTER   0
 
#define DIR_SEPARATOR   '/'
 
#define ATTRIB_ARCH   0x20
 
#define ATTRIB_DIR   0x10
 
#define ATTRIB_LFN   0x0F
 
#define ATTRIB_VOL   0x08
 
#define ATTRIB_SYS   0x04
 
#define ATTRIB_HID   0x02
 
#define ATTRIB_RO   0x01
 
#define CASE_LOWER_EXT   0x10
 
#define CASE_LOWER_BASE   0x08
 

Enumerations

enum  FILE_TYPE { FT_DIRECTORY, FT_FILE, FT_DIRECTORY, FT_FILE }
 
enum  DIR_ENTRY_offset {
  DIR_ENTRY_name = 0x00, DIR_ENTRY_extension = 0x08, DIR_ENTRY_attributes = 0x0B, DIR_ENTRY_caseInfo = 0x0C,
  DIR_ENTRY_cTime_ms = 0x0D, DIR_ENTRY_cTime = 0x0E, DIR_ENTRY_cDate = 0x10, DIR_ENTRY_aDate = 0x12,
  DIR_ENTRY_clusterHigh = 0x14, DIR_ENTRY_mTime = 0x16, DIR_ENTRY_mDate = 0x18, DIR_ENTRY_cluster = 0x1A,
  DIR_ENTRY_fileSize = 0x1C, DIR_ENTRY_name = 0x00, DIR_ENTRY_extension = 0x08, DIR_ENTRY_attributes = 0x0B,
  DIR_ENTRY_caseInfo = 0x0C, DIR_ENTRY_cTime_ms = 0x0D, DIR_ENTRY_cTime = 0x0E, DIR_ENTRY_cDate = 0x10,
  DIR_ENTRY_aDate = 0x12, DIR_ENTRY_clusterHigh = 0x14, DIR_ENTRY_mTime = 0x16, DIR_ENTRY_mDate = 0x18,
  DIR_ENTRY_cluster = 0x1A, DIR_ENTRY_fileSize = 0x1C
}
 

Functions

static bool _FAT_directory_isDirectory (DIR_ENTRY *entry)
 
static bool _FAT_directory_isWritable (DIR_ENTRY *entry)
 
static bool _FAT_directory_isDot (DIR_ENTRY *entry)
 
bool _FAT_directory_getFirstEntry (PARTITION *partition, DIR_ENTRY *entry, uint32_t dirCluster)
 
bool _FAT_directory_getNextEntry (PARTITION *partition, DIR_ENTRY *entry)
 
bool _FAT_directory_entryFromPath (PARTITION *partition, DIR_ENTRY *entry, const char *path, const char *pathEnd)
 
bool _FAT_directory_chdir (PARTITION *partition, const char *path)
 
bool _FAT_directory_removeEntry (PARTITION *partition, DIR_ENTRY *entry)
 
bool _FAT_directory_addEntry (PARTITION *partition, DIR_ENTRY *entry, uint32_t dirCluster)
 
uint32_t _FAT_directory_entryGetCluster (PARTITION *partition, const uint8_t *entryData)
 
bool _FAT_directory_entryFromPosition (PARTITION *partition, DIR_ENTRY *entry)
 
void _FAT_directory_entryStat (PARTITION *partition, DIR_ENTRY *entry, struct stat *st)
 
bool _FAT_directory_getVolumeLabel (PARTITION *partition, char *label)
 

Macro Definition Documentation

◆ ALIAS_ENTRY_LENGTH

#define ALIAS_ENTRY_LENGTH   11

◆ ATTRIB_ARCH

#define ATTRIB_ARCH   0x20

◆ ATTRIB_DIR

#define ATTRIB_DIR   0x10

◆ ATTRIB_HID

#define ATTRIB_HID   0x02

◆ ATTRIB_LFN

#define ATTRIB_LFN   0x0F

◆ ATTRIB_RO

#define ATTRIB_RO   0x01

◆ ATTRIB_SYS

#define ATTRIB_SYS   0x04

◆ ATTRIB_VOL

#define ATTRIB_VOL   0x08

◆ CASE_LOWER_BASE

#define CASE_LOWER_BASE   0x08

◆ CASE_LOWER_EXT

#define CASE_LOWER_EXT   0x10

◆ DIR_ENTRY_DATA_SIZE

#define DIR_ENTRY_DATA_SIZE   0x20

◆ DIR_SEPARATOR

#define DIR_SEPARATOR   '/'

◆ FAT16_ROOT_DIR_CLUSTER

#define FAT16_ROOT_DIR_CLUSTER   0

◆ LFN_ENTRY_LENGTH

#define LFN_ENTRY_LENGTH   13

◆ MAX_ALIAS_EXT_LENGTH

#define MAX_ALIAS_EXT_LENGTH   3

◆ MAX_ALIAS_LENGTH

#define MAX_ALIAS_LENGTH   13

◆ MAX_ALIAS_PRI_LENGTH

#define MAX_ALIAS_PRI_LENGTH   8

◆ MAX_LFN_LENGTH

#define MAX_LFN_LENGTH   256

◆ MAX_NUMERIC_TAIL

#define MAX_NUMERIC_TAIL   999999

Enumeration Type Documentation

◆ DIR_ENTRY_offset

Enumerator
DIR_ENTRY_name 
DIR_ENTRY_extension 
DIR_ENTRY_attributes 
DIR_ENTRY_caseInfo 
DIR_ENTRY_cTime_ms 
DIR_ENTRY_cTime 
DIR_ENTRY_cDate 
DIR_ENTRY_aDate 
DIR_ENTRY_clusterHigh 
DIR_ENTRY_mTime 
DIR_ENTRY_mDate 
DIR_ENTRY_cluster 
DIR_ENTRY_fileSize 
DIR_ENTRY_name 
DIR_ENTRY_extension 
DIR_ENTRY_attributes 
DIR_ENTRY_caseInfo 
DIR_ENTRY_cTime_ms 
DIR_ENTRY_cTime 
DIR_ENTRY_cDate 
DIR_ENTRY_aDate 
DIR_ENTRY_clusterHigh 
DIR_ENTRY_mTime 
DIR_ENTRY_mDate 
DIR_ENTRY_cluster 
DIR_ENTRY_fileSize 

◆ FILE_TYPE

enum FILE_TYPE
Enumerator
FT_DIRECTORY 
FT_FILE 
FT_DIRECTORY 
FT_FILE 

Function Documentation

◆ _FAT_directory_addEntry()

bool _FAT_directory_addEntry ( PARTITION partition,
DIR_ENTRY entry,
uint32_t  dirCluster 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _FAT_directory_chdir()

bool _FAT_directory_chdir ( PARTITION partition,
const char *  path 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _FAT_directory_entryFromPath()

bool _FAT_directory_entryFromPath ( PARTITION partition,
DIR_ENTRY entry,
const char *  path,
const char *  pathEnd 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _FAT_directory_entryFromPosition()

bool _FAT_directory_entryFromPosition ( PARTITION partition,
DIR_ENTRY entry 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _FAT_directory_entryGetCluster()

uint32_t _FAT_directory_entryGetCluster ( PARTITION partition,
const uint8_t entryData 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _FAT_directory_entryStat()

void _FAT_directory_entryStat ( PARTITION partition,
DIR_ENTRY entry,
struct stat *  st 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _FAT_directory_getFirstEntry()

bool _FAT_directory_getFirstEntry ( PARTITION partition,
DIR_ENTRY entry,
uint32_t  dirCluster 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _FAT_directory_getNextEntry()

bool _FAT_directory_getNextEntry ( PARTITION partition,
DIR_ENTRY entry 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _FAT_directory_getVolumeLabel()

bool _FAT_directory_getVolumeLabel ( PARTITION partition,
char *  label 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _FAT_directory_isDirectory()

static bool _FAT_directory_isDirectory ( DIR_ENTRY entry)
inlinestatic

◆ _FAT_directory_isDot()

static bool _FAT_directory_isDot ( DIR_ENTRY entry)
inlinestatic

◆ _FAT_directory_isWritable()

static bool _FAT_directory_isWritable ( DIR_ENTRY entry)
inlinestatic

◆ _FAT_directory_removeEntry()

bool _FAT_directory_removeEntry ( PARTITION partition,
DIR_ENTRY entry 
)
Here is the call graph for this function:
Here is the caller graph for this function: