FAT FS: Is there a way to "watch" files?

sameerazer wrote on Thursday, July 12, 2018:

Hello there,

I was wondering if FreeRTOS+FAT includes a file-watching feature, where a callback can be invoked when a given file changes.

Thank you.

rtel wrote on Thursday, July 12, 2018:

Don’t think so.

rtel wrote on Thursday, July 12, 2018:

Looks like my answer was a bit hasty. Hein points out:

There are some helpful hooks, please check-out ‘ffconfigUSE_NOTIFY’ in
ff_stdio.h

 typedef enum _EFileAction {
     eFileCreate,
     eFileRemove,
     eFileChange,
     eFileIsDir = 0x80,
 } eFileAction_t;

 void callFileEvents( const char *apPath, eFileAction_t aAction );

sameerazer wrote on Thursday, July 12, 2018:

Oh! That’s fantastic. Thank you!