I think I have a simple question, but I cant figure it out. I would like to get the directory of a file.
Example:
path = /mnt/sdcard/music/music.mp3
Should return ‘music’
public String getDir(String pathAudioFile)
{
File f = new File(pathAudioFile);
return f.???
}
will return just “music”, stripping off the leading path elements.