Fray Engine
Loading...
Searching...
No Matches
fray::watch::FileId Struct Reference

Filesystem identity surviving renames: device and inode, or volume and file index. More...

#include <file_watcher.hpp>

Public Member Functions

bool valid () const
 Returns whether either identity component is nonzero.
bool operator== (const FileId &other) const
 Tests two identities for equality.
bool operator!= (const FileId &other) const
 Tests two identities for inequality.
bool operator< (const FileId &other) const
 Orders identities by device and then index.

Public Attributes

std::uint64_t device = 0
 Device number or volume serial number.
std::uint64_t index = 0
 Inode number or file index.

Detailed Description

Filesystem identity surviving renames: device and inode, or volume and file index.

Definition at line 36 of file file_watcher.hpp.

Member Function Documentation

◆ operator!=()

bool fray::watch::FileId::operator!= ( const FileId & other) const
inline

Tests two identities for inequality.

Parameters
otherIdentity to compare.
Returns
True if either component differs.

Definition at line 63 of file file_watcher.hpp.

◆ operator<()

bool fray::watch::FileId::operator< ( const FileId & other) const
inline

Orders identities by device and then index.

Parameters
otherIdentity to compare.
Returns
True if this identity sorts before other.

Definition at line 70 of file file_watcher.hpp.

◆ operator==()

bool fray::watch::FileId::operator== ( const FileId & other) const
inline

Tests two identities for equality.

Parameters
otherIdentity to compare.
Returns
True if both components match.

Definition at line 56 of file file_watcher.hpp.

◆ valid()

bool fray::watch::FileId::valid ( ) const
inline

Returns whether either identity component is nonzero.

Definition at line 50 of file file_watcher.hpp.

Member Data Documentation

◆ device

std::uint64_t fray::watch::FileId::device = 0

Device number or volume serial number.

Definition at line 41 of file file_watcher.hpp.

◆ index

std::uint64_t fray::watch::FileId::index = 0

Inode number or file index.

Definition at line 45 of file file_watcher.hpp.


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