@node _media_type, file system @findex _media_type @subheading Syntax @example #include int _media_type( const int drive ); @end example @subheading Description This function checks if drive number @var{drive} (1 == A:, 2 == B:, etc., 0 == default drive) is fixed or removable. @code{_media_type} should only be called after you are sure the drive isn't a CD-ROM or a RAM disk, since these might fool you with this call. @subheading Return Value 1 if the drive is a fixed disk, 0 if it is removable. -1 on error. @subheading Portability @portability !ansi, !posix @subheading Example @example #include #include int main(void) @{ if( _media_type( 'C' - 'A' + 1 ) ) @{ printf("C: is (probably) a hard drive.\n"); @} else @{ printf("C: is (probably) a removable drive.\n"); @} exit(0); @} @end example