Author Topic: checking for file existance  (Read 2375 times)

Offline neil

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
checking for file existance
« on: November 08, 2013, 08:12:32 PM »
Hi Mark,
  Is there a command for checking if a file exists? I am using the open command, then closing if exists, but wondering if there is an easier way.

Thanks
Neil

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2955
    • View Profile
    • uTasker
Re: checking for file existance
« Reply #1 on: November 08, 2013, 10:22:25 PM »
Hi Neil

The method that you are using is a good method. It would be possible to add a specific function that returns success when the file does (or doesn't) exist but it will essentially need to do the same work.

I am presently coming to completion of utFAT V2.0 which contains various new functions and capabilities, so if you think that there would be an advantage in having such a function please recommend its prototype which would best suit your use case.

Regards

Mark

Offline neil

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: checking for file existance
« Reply #2 on: November 09, 2013, 06:49:02 AM »
Hi Mark
  I think it would be handy having an access(..) command similar to the windows version.

Best Regards
Neil