Free space on SD Card?

Discussion in 'Wii - Emulation and Homebrew' started by zapfbandit, Jun 12, 2009.

  1. zapfbandit
    OP

    zapfbandit Member

    Newcomer
    26
    0
    Sep 4, 2008
    United States
    All,

    I am writing an app (a gesture recorder) for the Wii which requires me to write fairly large files to the internal (front) SD slot (using and SDHC card).

    I would like to have some sort of countdown showing the amount of disk space left rather than suddenly running out of space and having an fwrite to fail.

    Is there an easy way of checking how much free space the SD card has?

    Thanks in advance,
    Zapf Bandit
     
  2. TornZero

    TornZero GBAtemp Regular

    Member
    197
    0
    Mar 15, 2009
    United States
    1. Plug your SD into the computer.
    2. Go into the root of your card from My Computer.
    3. Right click in an empty space on your SD card.
    4. Click Properties.

    A pop-up should... pop up. It'll show you how much space is left on your SD card and how much is used up.
     
  3. wiiNinja

    wiiNinja GBAtemp Fan

    Member
    387
    25
    Jan 13, 2009
    United States
    Don't think that's what the OP is asking. He wants to know if there's a way in his homebrew app to know how much space remains on the SD card (a function call of some sort).
     
  4. TornZero

    TornZero GBAtemp Regular

    Member
    197
    0
    Mar 15, 2009
    United States
    Then you'll have to figure out how to convert blocks (How the Wii records data) into MB/KB.
     
  5. WiiThoko

    WiiThoko GBAtemp Fan

    Member
    353
    1
    Apr 5, 2009
    United States
    That's not what he means either [​IMG]

    He means that something that could show the space left on the SD Card in the app he's making. I'm sure this is possible, as the Homebrew Browser shows the space left on the SD Card, but I don't know anything about programming, so I can't help you...
     
  6. zapfbandit
    OP

    zapfbandit Member

    Newcomer
    26
    0
    Sep 4, 2008
    United States
    Yeah, I was after some code to do it :-)

    Anyway I have got a slight insight since I have found how to get partition information.

    Unfortunately it looks like I'll have to scan every cluster one by one which might be slow.

    Oh well, I'll put the answer here when I've worked it out.

    Thanks for the feedback,
    Zapf Bandit