FileSystem opaque pointers

Hi,

the mbed class FileSystem (mbed-os/FileSystem.h at master · ARMmbed/mbed-os · GitHub)
is defining opaque pointers (l. 34 ff.):

// Opaque pointer representing files and directories.
typedef void *fs_file_t;
typedef void *fs_dir_t;

What types are compatible with these and, out of personal interest, why was it chosen to use opaque pointers for this, after all?

You should check the design first. There are different classes deriving from FileSystem. All of them can return a different type for this pointer. You shouldn’t take care about it.

if you use FAT, it will be a FIL *, see FatFs - FIL

for LittleFs it will be a lfs_file_t *