Free space on SD Card?

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

Jun 12, 2009

Free space on SD Card? by zapfbandit at 1:27 PM (1,280 Views / 0 Likes) 5 replies

  1. zapfbandit
    OP

    Newcomer zapfbandit Member

    Joined:
    Sep 4, 2008
    Messages:
    26
    Country:
    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

    Member TornZero GBAtemp Regular

    Joined:
    Mar 15, 2009
    Messages:
    197
    Country:
    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

    Member wiiNinja GBAtemp Fan

    Joined:
    Jan 13, 2009
    Messages:
    378
    Country:
    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

    Member TornZero GBAtemp Regular

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

    Member WiiThoko GBAtemp Fan

    Joined:
    Apr 5, 2009
    Messages:
    353
    Country:
    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

    Newcomer zapfbandit Member

    Joined:
    Sep 4, 2008
    Messages:
    26
    Country:
    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
     

Share This Page