Rockbox mail archiveSubject: Re: Newbie API questions
From: Daniel Stenberg (daniel_at_haxx.se)
On Thu, 1 May 2003, ds2list wrote:
> 1) Given a pathname to an mp3 file, what sequence of function calls
Yes, that's right. There's basicly only one place in the code where we start
> Could I build a playlist for just one file if I wanted to?
> 2) How are directories and files addressed in the API?
For files: open() / close() / read() / write()
For dirs: opendir() / readdir() / closedir()
> Is it by file/directory name string?
> I see lots of integers seeming to represent directories in the code.
Those are file descriptors as returned by one of the function calls above, as
int fd = open("/myfile.txt", O_RDONLY);
close(fd); /* close file again */
-- Daniel Stenberg -- http://rockbox.haxx.se/ -- http://daniel.haxx.se/
Page was last modified "Jan 10 2012" The Rockbox Crew