[SOLVED]Current directory name

Support for the GBA/DS/Gamecube/Wii media card library
Post Reply
Quipeace
Posts: 6
Joined: Sun Dec 27, 2009 9:31 pm

[SOLVED]Current directory name

Post by Quipeace » Mon Jan 11, 2010 9:13 pm

Hey,

I'm creating a simple terminal like file browser and until now I've been tracking the current directory name by hand, however, running "cd .." would result in a "current directory" called "/dir/.." instead of "/".

So I was wondering, how would I get the current directory name? (similar to something like readdir I suppose)
Last edited by Quipeace on Tue Jan 12, 2010 4:07 pm, edited 1 time in total.

WinterMute
Site Admin
Posts: 1478
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Current directory name

Post by WinterMute » Tue Jan 12, 2010 1:34 pm

getcwd
Help keep devkitPro toolchains free, Donate today

Personal Blog

Quipeace
Posts: 6
Joined: Sun Dec 27, 2009 9:31 pm

Re: Current directory name

Post by Quipeace » Tue Jan 12, 2010 1:52 pm

Thank you very much, I appreciate it :), I'll try it as soon as I get home.

EDIT: Works perfectly :)

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests