mirror of
https://github.com/86Box/86Box.git
synced 2026-02-25 04:45:31 -07:00
Introduce plat_file_check and use it for ROM existence checking
This commit is contained in:
@@ -412,6 +412,16 @@ plat_dir_check(char *path)
|
||||
return S_ISDIR(dummy.st_mode);
|
||||
}
|
||||
|
||||
int
|
||||
plat_file_check(const char *path)
|
||||
{
|
||||
struct stat dummy;
|
||||
if (stat(path, &dummy) < 0) {
|
||||
return 0;
|
||||
}
|
||||
return !S_ISDIR(dummy.st_mode);
|
||||
}
|
||||
|
||||
int
|
||||
plat_dir_create(char *path)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user