summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/FileUtil.cpp
diff options
context:
space:
mode:
authornakeee <nakeee@gmail.com>2009-02-24 15:04:12 +0000
committernakeee <nakeee@gmail.com>2009-02-24 15:04:12 +0000
commit9b1f0f9083d989b30a52fae549be8d488c3acede (patch)
treeeaa0b6058220ae3e3b4ca94697aabada55bebda1 /Source/Core/Common/Src/FileUtil.cpp
parente79a93f6168c3205cee892dd7c5765e948c17228 (diff)
Added cdutils which suppose to scan for devices in a portable way (ripped from cdio)
Changed the Code to use it instead of DriveUtil code. Please test the code git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2413 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/Src/FileUtil.cpp')
-rw-r--r--Source/Core/Common/Src/FileUtil.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp
index 07ffc9d1f3..0d79954fa2 100644
--- a/Source/Core/Common/Src/FileUtil.cpp
+++ b/Source/Core/Common/Src/FileUtil.cpp
@@ -72,40 +72,6 @@ bool Exists(const char *filename)
return (result == 0);
}
-bool IsDisk(const char *filename)
-{
-#ifdef _WIN32
- if (GetDriveType(filename) == DRIVE_CDROM) // CD_ROM also applies to DVD. Noone has a plain CDROM without DVD anymore so we should be fine.
- return true;
-#else
- struct stat statInfo;
- if((stat(filename, &statInfo) > -1) && (S_ISCHR(statInfo.st_mode) || S_ISBLK(statInfo.st_mode)))
- {
- int fileHandle;
- // try to open the device
- fileHandle = open(filename, O_RDONLY | O_NONBLOCK, 0);
- if (fileHandle >= 0)
- {
- cdrom_subchnl cdChannelInfo;
- cdChannelInfo.cdsc_format = CDROM_MSF;
-
- if ((ioctl(fileHandle, CDROMSUBCHNL, &cdChannelInfo) == 0) ||
- (errno == EIO) || (errno == ENOENT) ||
- (errno == EINVAL)
- #ifdef __GNUC__
- || (errno == ENOMEDIUM)
- #endif
- )
- {
- return true;
- }
- close(fileHandle);
- }
- }
-#endif
- return false;
-}
-
bool IsDirectory(const char *filename)
{
struct stat file_info;