Forums Assignment Help How can I find out how much free space is available on disk?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1278
    Aakanksha
    Participant

    How can I find out how much free space is available on disk?

    #9839
    Aakanksha
    Participant

    There is no portable way. Under some versions of Unix you can call statfs. Under MS-DOS, use interrupt 0x21 subfunction 0x36, or perhaps a routine such as disk free. Another possibility is to use popen to invoke and read the output of a disk free” command (df on Unix).

    (Note that the amount of free space apparently available on a disk may not match the size of the largest file you can store, for all sorts of reasons.)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.