(Core) Remove obsolete file checking function

This commit is contained in:
TwinAphex51224 2012-02-15 18:43:35 +01:00
parent b87e1c4f48
commit 317f255eae
3 changed files with 3 additions and 28 deletions

21
file.c
View File

@ -938,27 +938,6 @@ void dir_list_free(char **dir_list)
free(orig);
}
#ifdef SSNES_CONSOLE
bool filepath_exists(const char *path)
{
#ifdef _WIN32
DWORD file_attr;
file_attr = GetFileAttributes(path);
if (0xFFFFFFFF == file_attr)
return false;
return true;
#elif defined(__CELLOS_LV2__)
CellFsStat file_attr;
if(cellFsStat(path,&file_attr) == CELL_FS_SUCCEEDED)
return true;
else
return false;
#endif
}
#endif
bool path_is_directory(const char *path)
{
#ifdef _WIN32

4
file.h
View File

@ -47,10 +47,6 @@ void dir_list_free(char **dir_list);
bool path_is_directory(const char *path);
bool path_file_exists(const char *path);
#ifdef SSNES_CONSOLE
bool filepath_exists(const char *path);
#endif
// Path-name operations.
// If any of these operation are detected to overflow, the application will be terminated.

View File

@ -165,7 +165,7 @@ static void set_default_settings(void)
static void init_settings(void)
{
if(!filepath_exists(SYS_CONFIG_FILE))
if(!path_file_exists(SYS_CONFIG_FILE))
{
SSNES_ERR("Config file \"%s\" doesn't exist. Creating...\n", SYS_CONFIG_FILE);
FILE * f;
@ -210,7 +210,7 @@ static void init_settings(void)
static void save_settings(void)
{
if(!filepath_exists(SYS_CONFIG_FILE))
if(!path_file_exists(SYS_CONFIG_FILE))
{
FILE * f;
f = fopen(SYS_CONFIG_FILE, "w");
@ -427,7 +427,7 @@ begin_loop:
goto begin_loop;
begin_shutdown:
if(filepath_exists(SYS_CONFIG_FILE))
if(path_file_exists(SYS_CONFIG_FILE))
save_settings();
ps3_input_deinit();
ps3_video_deinit();