On Fri, Apr 12, 2019 at 11:41 AM Eric Engestrom <eric.engest...@intel.com>
wrote:

> On Friday, 2019-04-12 11:00:56 -0400, Marek Olšák wrote:
> > On Thu, Apr 11, 2019 at 2:53 AM Tapani Pälli <tapani.pa...@intel.com>
> wrote:
> > > On 4/11/19 3:32 AM, Marek Olšák wrote:
> > > > -      file = fopen(filename, "w");
> > > > +         }
> > > > +         FILE *file = fopen(filename, "r");
> > > > +         if (!file)
> > > > +            break;
> > >
> > > I'm surprised we don't have some helper like 'util_path_exists' but
> this
> > > works, I guess then we should have 'util_path_isdir|isfile' and others
> > > as well.
> > >
> >
> > There is no standard API for checking whether a file exists. fopen is the
> > only standard way to do it.
>
> What about `access(filename, F_OK)` ?
>

That's not standard C API.

Marek
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to