µTasker Forum

µTasker Forum => utFAT => Topic started by: neil on January 20, 2010, 06:03:44 PM

Title: Closed/Open File Indicator
Post by: neil 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
Title: Re: Closed/Open File Indicator
Post by: mark 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