µTasker Forum

µTasker Forum => utFAT => Topic started by: neil on November 14, 2014, 06:29:32 PM

Title: MANAGED_FILES
Post by: neil on November 14, 2014, 06:29:32 PM
Hi Mark,
  I have just upgraded to the latest uFat and noticed MANAGED_FILES isnt defined , but see UTFAT_MANAGED_MODE defined as #10 in the .h file.  Does this mean I havent been using managed mode?

Do I have to #define MANAGED_FILES too?  If so, what is the value after it represent?


What is the difference between MANAGED_FILES/MANAGED_FILE_COUNT  and UTMANAGED_FILE_COUNT ?

Thanks

Neil
Title: Re: MANAGED_FILES
Post by: mark on November 14, 2014, 09:00:49 PM
Hi Neil

MANAGED_FILES is used for other storage types (like internal Flash or SPI flash). The number of such managed files at the same time is defined by MANAGED_FILE_COUNT.

The SD card used UTMANAGED_FILE_COUNT can be missing or have a value of UTMANAGED_FILE_COUNT 0 (this is for backward compatibility) to be disabled > 1 is enabled for this many files. This allows files to be protected from another (eg. don't allow more than one write to be opened at the same time but keep reads synchronised)

A new feature can be enabled separately:
UTFAT_FILE_CACHE_POOL - this adds optional data cache to indivicual files and can greatly speed up writing lots of small amounts of data to a file.

Some new options don't need any additional basic support to be enabled - such as opening a file with teh property UTFAT_COMMIT_FILE_ON_CLOSE will avoid writing file changes on each write and only update on a file close. This can save a lot of writes to the file object but has a risk of losing written data if not closed before a reset - the user can therfore decide on a usage basis which of the properties speed vs security are most important for each file used.
Furthermore the support for LFN creation, renaming etc. has been greatlys extended with workaroudn for avoiding Microsoft patent and various advanced functiosn for analysing files and deleted files and undelete.

You should find the options and a description of them in the latest utFAT document: http://www.utasker.com/docs/uTasker/uTasker_utFAT.PDF

Regards

Mark