esp_vfs_register_with_id() function
Special case function for registering a VFS that uses a method other than open() to open new file descriptors. In comparison with esp_vfs_register_fd_range, this function doesn't pre-registers an interval of file descriptors. File descriptors can be registered later, by using esp_vfs_register_fd.
Arguments
vfs
Pointer to esp_vfs_t. Meaning is the same as for esp_vfs_register().
ctx
Pointer to context structure. Meaning is the same as for esp_vfs_register().
vfs_id
Here will be written the VFS ID which can be passed to esp_vfs_register_fd for registering file descriptors.
Return value
ESP_OK if successful, ESP_ERR_NO_MEM if too many VFSes are registered, ESP_ERR_INVALID_ARG if the file descriptor boundaries are incorrect.