2.6.1.2 Access

typedef void (*ZixDirEntryVisitFunc)(const char *path, const char *name, void *data)

Function for reading input bytes from a stream.

Param path:

Path to the directory being visited.

Param name:

Name of the directory entry.

Param data:

Opaque user data.

void zix_dir_for_each(const char *path, void *data, ZixDirEntryVisitFunc f)

Visit every file in the directory at path.

Parameters:
  • path – A path to a directory.

  • data – Opaque user data that is passed to f.

  • f – A function called on every entry in the directory. The path parameter is always the directory path passed to this function, the name parameter is the name of the directory entry (not its full path).

bool zix_file_equals(ZixAllocator *allocator, const char *a_path, const char *b_path)

Return whether the given paths point to files with identical contents.

Parameters:
  • allocator – Allocator used for a memory block for comparison if necessary.

  • a_path – Path to the first file to compare

  • b_path – Path to the second file to compare

Returns:

True if the two files have byte-for-byte identical contents.