#104062 - bjoerngiesler - Tue Sep 26, 2006 8:15 am
Is there a way to determine the free file system space on a FAT-formatted card? I haven't found any so far...
TIA!
_________________
DSFTP homepage
TIA!
_________________
DSFTP homepage
| chishm wrote: |
| Manually:
Scan the FAT and add total the number of empty clusters, then multiply that by the number of bytes per cluster. |
| Quote: |
| Not doable with gba_nds_fat or libfat. Is there even a POSIX function for this? |
| chishm wrote: |
| it is pretty hard to add functionality to libfat, due to the requirement for calls to go through newlib |
| chishm wrote: |
| Having libfat fake a /proc directory adds unnecessary complications to the file tree. "fat:/" is the root of the FAT device, not the root of the entire device tree. What happens if a "fat:/proc/" directory actually exists? |
| Quote: |
| It would be posible to add a second device to the device table specifically for "proc:", but what happens if another file system device driver tries to do the same? |
| Quote: |
| If directories are treated as files then either only the filenames are readable as though it's a text file, or more data is obtainable through a proprietry format. |
| Quote: |
| Specific directory listing functions are much better. |
| tepples wrote: | ||
They're not "much better" if no version of devkitPro that uses them is available. |
| chishm wrote: |
| I could just write temporary wrapper functions that call the FAT directory listing functions directly, rather than using the correct method of going through the device table. |