Returns file extents, each with the number of blocks, starting block, and volume block. numbers
#include <dfs.h> int dfs_getfilemapinfo ( int fildes, uint32_t startingBlock, int *entryCount, size_t tableSize, dfs_filemap_t *table );
(IN) Specifies the file handle returned from a prior call to open for the file.
(IN) Specifies the starting file block address for which map is requested (zero relative).
(OUT) Points to the number of valid file map entries returned.
(IN) Specifies the number of file map entries for which space has been allocated by the caller in the following table (that is, maximum number of dfs_filemap_t structures to be returned).
(OUT) Points to a table of file map entries.
If successful, returns 0. Otherwise, returns a nonzero error code:
For possible DFS errors, see Section 13.4.5, DFS Return Values.
This function provides the details of exactly where a given file’s logical blocks are located, including where file holes and the end of a file’s allocated storage space is, so that the application can expand the file by calling dfs_extend.