Author Topic: Closed/Open File Indicator  (Read 9365 times)

Offline neil

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
Closed/Open File Indicator
« on: January 20, 2010, 06:03:44 PM »
Hi Mark,
  Every day a new file will be generated on an SD Card, and I have one handle for the writing. If the stUTFILE member ptr_utDirObject=0, can I assume that the file is closed?

This will save me keeping an open/close flag for each file, so I can simply close it if ptr_utDirObject !=0 before creating a new file.


Neil
« Last Edit: January 20, 2010, 07:08:27 PM by neil »

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: Closed/Open File Indicator
« Reply #1 on: January 20, 2010, 08:37:39 PM »
Hi Neil

This pointer is entered by the user so that the interface can work with the user's directory location.

If you close the file using utCloseFile() the UTFILE object's contents will however be set to 0. This will therefore allow you to recognise whether it closed or not, although that is not its aim.

Regards

Mark