Resolves paths.
More...
#include <sqsh_tree_private.h>
Resolves paths.
Definition at line 55 of file sqsh_tree_private.h.
◆ sqsh_path_resolver_dir_inode()
Returns the inode of the current working directory.
- Parameters
-
[in] | walker | The walker to use |
- Returns
- the inode of the current entry.
◆ sqsh_path_resolver_down()
Lets the walker enter the current entry.
- Parameters
-
[in,out] | walker | The walker to use |
- Returns
- 0 on success, less than 0 on error.
◆ sqsh_path_resolver_free()
Cleans up resources used by a SqshPathResolver struct.
- Parameters
-
[in,out] | reader | The file reader struct to clean up. |
- Returns
- 0 on success, less than 0 on error.
◆ sqsh_path_resolver_inode_ref()
Returns the inode reference of the current entry.
- Parameters
-
[in] | walker | The walker to use |
- Returns
- the inode reference of the current item the resolver is pointing to.
◆ sqsh_path_resolver_lookup()
Looks up an entry in the current directory.
- Parameters
-
[in,out] | walker | The walker to use |
[in] | name | The name of the entry to look up. |
[in] | name_size | The size of the name. |
- Returns
- 0 on success, less than 0 on error.
◆ sqsh_path_resolver_name()
Returns the name of the current entry. This entry is not zero terminated.
- Parameters
-
[in] | walker | The walker to use |
- Returns
- the name of the current entry.
◆ sqsh_path_resolver_name_dup()
creates a heap allocated copy of the name of the current entry.
The caller is responsible for calling free() on the returned pointer.
The returned string is 0 terminated.
- Parameters
-
[in] | walker | The walker to use |
- Returns
- the name of the current entry.
◆ sqsh_path_resolver_name_size()
Returns the size of the name of the current entry.
- Parameters
-
[in] | walker | The walker to use |
- Returns
- the size of the name of the current entry.
◆ sqsh_path_resolver_new()
Creates a new SqshPathResolver object at the root inode.
- Parameters
-
[in] | archive | The archive to use |
[out] | err | Pointer to an int where the error code will be stored. |
- Returns
- a new file reader.
◆ sqsh_path_resolver_next()
Moves the walker to the next entry int the current directory.
- Parameters
-
[in,out] | walker | The walker to use |
[out] | err | Pointer to an int where the error code will be stored. |
- Return values
-
true | if the walker was moved to the next entry. |
false | if the walker has no more entries to move to or an error occured. |
◆ sqsh_path_resolver_open_file()
Returns the inode of the current entry.
- Parameters
-
[in,out] | walker | The walker to use |
[out] | err | Pointer to an int where the error code will be |
- Returns
- the inode of the current entry.
◆ sqsh_path_resolver_resolve()
Resolve a path with the tree walker.
This function will resolve the given path with the tree walker. The base is the current directory.
- Parameters
-
[in,out] | walker | The walker to use |
[in] | path | The path to resolve. |
[in] | follow_symlinks | Whether to follow symlinks. |
- Returns
- the inode of the current entry.
◆ sqsh_path_resolver_revert()
reverts the walker to the begining of the current directory.
- Parameters
-
[in,out] | walker | The walker to use |
- Returns
- 0 on success, less than 0 on error.
◆ sqsh_path_resolver_to_root()
Moves the walker to the root directory.
- Parameters
-
[in,out] | walker | The walker to use |
- Returns
- 0 on success, less than 0 on error.
◆ sqsh_path_resolver_type()
Returns the inode type of the current entry.
- Parameters
-
[in] | walker | The walker to use |
- Returns
- the inode type of the current entry.
◆ sqsh_path_resolver_up()
Moves the walker one level up.
- Parameters
-
[in,out] | walker | The walker to use |
- Returns
- 0 on success, less than 0 on error.
The documentation for this struct was generated from the following files: