Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: A few more questions

Re: A few more questions

From: ds2list <ds2list_at_yahoo.com>
Date: Fri, 02 May 2003 17:19:33 -0700

>
>> Also, when I do an open(filename, O_RDONLY) on a pathname to
>> a file that I know doesn't exist, open() doesn't return a
>> negative value.
>
> It should. Are you sure that your code is correct? Can you show it?
>
> Linus

Sure, it looks like this:


FILE * mp3_file = open("folder/.mymp3.mp3", 0_RDONLY);

if (mp3_file < 0)
{

  // File was not found

}

else
{
  // File was found

}


Could it be that I'm trying to check for the existence of a
dotfile? In any case, open() is not returning a negative value,
even though I know that the file/path is phony.


Thanks,

Danan
Received on 2003-05-03

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy