SVCS - English Documentation
Loading...
Searching...
No Matches
svcs::core::TreeEntry Struct Reference

Represents a single item (file or subdirectory) within a Tree object. More...

#include <Tree.hxx>

Public Member Functions

bool operator< (const TreeEntry &other) const
 Comparison operator required for sorting.

Public Attributes

std::string mode
 File mode (permissions) and type identifier (e.g., "100644" for a blob, "040000" for a tree).
std::string name
 The name of the file or subdirectory.
std::string hash_id
 The hash ID (SHA-256) of the referenced object (Blob or Tree).
std::string type
 The type of the referenced object ("blob" or "tree").

Detailed Description

Represents a single item (file or subdirectory) within a Tree object.

This structure links a name and file mode to the hash ID of another VCS object.

Member Function Documentation

◆ operator<()

bool svcs::core::TreeEntry::operator< ( const TreeEntry & other) const

Comparison operator required for sorting.

Entries must be sorted alphabetically by name before serialization to ensure a stable and consistent hash ID for the Tree object.

Parameters
otherThe TreeEntry to compare against.
Returns
bool True if this entry should precede the 'other' entry in the sorted list.

The documentation for this struct was generated from the following files: