| 123 | } |
| 124 | |
| 125 | long |
| 126 | freediskspace(char *path) |
| 127 | { |
| 128 | char tmppath[4]; |
| 129 | DWORD SectorsPerCluster = 0; |
| 130 | DWORD BytesPerSector = 0; |
| 131 | DWORD FreeClusters = 0; |
| 132 | DWORD TotalClusters = 0; |
| 133 | |
| 134 | tmppath[0] = *path; |
| 135 | tmppath[1] = ':'; |
| 136 | tmppath[2] = '\\'; |
| 137 | tmppath[3] = '\0'; |
| 138 | GetDiskFreeSpace(tmppath, &SectorsPerCluster, &BytesPerSector, |
| 139 | &FreeClusters, &TotalClusters); |
| 140 | return (long) (SectorsPerCluster * BytesPerSector * FreeClusters); |
| 141 | } |
| 142 | |
| 143 | /* |
| 144 | * Functions to get filenames using wildcards |
nothing calls this directly
no outgoing calls
no test coverage detected