PHYSFS_getCdRomDirs

Function PHYSFS_getCdRomDirs 

Source
pub unsafe extern "C" fn PHYSFS_getCdRomDirs() -> *mut *mut c_char
Expand description

\fn char **PHYSFS_getCdRomDirs(void) \brief Get an array of paths to available CD-ROM drives.

The dirs returned are platform-dependent (“D:" on Win32, “/cdrom” or whatnot on Unix). Dirs are only returned if there is a disc ready and accessible in the drive. So if you’ve got two drives (D: and E:), and only E: has a disc in it, then that’s all you get. If the user inserts a disc in D: and you call this function again, you get both drives. If, on a Unix box, the user unmounts a disc and remounts it elsewhere, the next call to this function will reflect that change.

This function refers to “CD-ROM” media, but it really means “inserted disc media,” such as DVD-ROM, HD-DVD, CDRW, and Blu-Ray discs. It looks for filesystems, and as such won’t report an audio CD, unless there’s a mounted filesystem track on it.

The returned value is an array of strings, with a NULL entry to signify the end of the list:

\code char **cds = PHYSFS_getCdRomDirs(); char **i;

for (i = cds; *i != NULL; i++) printf(“cdrom dir [%s] is available.\n”, *i);

PHYSFS_freeList(cds); \endcode

This call may block while drives spin up. Be forewarned.

When you are done with the returned information, you may dispose of the resources by calling PHYSFS_freeList() with the returned pointer.

\return Null-terminated array of null-terminated strings.

\sa PHYSFS_getCdRomDirsCallback