LICK
 All Data Structures Files Functions Variables Enumerations Enumerator
Data Structures | Enumerations | Functions
drives.h File Reference

Find drives in the system. More...

#include "llist.h"
Include dependency graph for drives.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  drive_t
 info about a drive More...
 

Enumerations

enum  drive_type_e {
  DRV_UNKNOWN, DRV_UNUSED, DRV_HDD, DRV_REMOVABLE,
  DRV_REMOTE, DRV_CDROM
}
 

Functions

drive_type_e drive_type (char *path)
 determines the type of a drive More...
 
node_tall_drives ()
 return a list of all drives in the system More...
 
char * unused_drive ()
 return an unused drive path More...
 
void free_drive (drive_t *drive)
 free a drive structure More...
 
void free_drive_list (node_t *lst)
 free a list of drive structures More...
 
int is_lick_drive (drive_t *drive)
 determines if a drive has LICK installed on it More...
 

Detailed Description

Find drives in the system.

Enumeration Type Documentation

the types of drives

Enumerator
DRV_UNKNOWN 

other

DRV_UNUSED 

an unused drive letter

DRV_HDD 

an internal hard drive

DRV_REMOVABLE 

an external hard drive, USB, etc.

DRV_REMOTE 

a network drive

DRV_CDROM 

a CD drive

Function Documentation

node_t* all_drives ( )

return a list of all drives in the system

Returns
a linked list of all drives. Must be freed using free_drive_list
drive_type_e drive_type ( char *  path)

determines the type of a drive

Parameters
patha drive in the form "A:/"
Returns
the type of drive
void free_drive ( drive_t drive)

free a drive structure

Parameters
drivethe drive structure to free
void free_drive_list ( node_t lst)

free a list of drive structures

Parameters
lstthe list of drive structures to free
int is_lick_drive ( drive_t drive)

determines if a drive has LICK installed on it

LICK can be installed on multiple drives

Parameters
drivethe drive to check
Returns
1 if the drive has LICK installed, otherwise 0
char* unused_drive ( )

return an unused drive path

Returns
an unused drive path. Must be freed using #free