libsqsh v1.5.1
Loading...
Searching...
No Matches
sqsh_tree.h File Reference
#include "sqsh_common.h"
#include "sqsh_file.h"
Include dependency graph for sqsh_tree.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  SqshTreeTraversalState { SQSH_TREE_TRAVERSAL_STATE_INIT , SQSH_TREE_TRAVERSAL_STATE_FILE , SQSH_TREE_TRAVERSAL_STATE_DIRECTORY_BEGIN , SQSH_TREE_TRAVERSAL_STATE_DIRECTORY_END }
 The state of the tree traversal. More...
 

Functions

const struct SqshDirectoryIteratorsqsh_tree_traversal_iterator (const struct SqshTreeTraversal *traversal)
 Gets the underlying directory iterator pointing to the current entry.
 

Detailed Description

Author
Enno Boland (mail@.nosp@m.ebol.nosp@m.and.d.nosp@m.e)

Definition in file sqsh_tree.h.

Enumeration Type Documentation

◆ SqshTreeTraversalState

The state of the tree traversal.

Enumerator
SQSH_TREE_TRAVERSAL_STATE_INIT 

The traversal is in the initial state, right after initialization.

SQSH_TREE_TRAVERSAL_STATE_FILE 

The traversal iterator is currently pointing at an object it will visit only once. This includes regular files, special files like named pipes, symlinks, or devices, and directories that will not be descended into because of a configured max depth.

SQSH_TREE_TRAVERSAL_STATE_DIRECTORY_BEGIN 

The traversal iterator is currently pointing at a directory object, right before SqshTreeTraversal is about to descend into it. The traversal iterator will eventually visit the same object with state SQSH_TREE_TRAVERSAL_STATE_DIRECTORY_END

SQSH_TREE_TRAVERSAL_STATE_DIRECTORY_END 

The traversal iterator is currently pointing at a directory object, after SqshTreeTraversal has finished iterating over it.

Definition at line 455 of file sqsh_tree.h.

Function Documentation

◆ sqsh_tree_traversal_iterator()

const struct SqshDirectoryIterator * sqsh_tree_traversal_iterator ( const struct SqshTreeTraversal * traversal)

Gets the underlying directory iterator pointing to the current entry.

Parameters
[in]traversalThe traversal to use
Returns
The directory iterator pointing to the current entry, iterating the parent directory, or NULL if the traversal is at its root entry