Doxygen
Loading...
Searching...
No Matches
DirEntry Class Reference

#include <src/dir.h>

Classes

struct  Private

Public Member Functions

 ~DirEntry ()
 DirEntry (const DirEntry &)
DirEntry & operator= (const DirEntry &)
 DirEntry (DirEntry &&)
DirEntry & operator= (DirEntry &&)
bool is_directory () const
bool is_regular_file () const
bool is_symlink () const
std::string path () const

Private Member Functions

 DirEntry ()

Private Attributes

std::unique_ptr< Private > p

Friends

class DirIterator

Detailed Description

Definition at line 22 of file dir.h.

Constructor & Destructor Documentation

◆ ~DirEntry()

DirEntry::~DirEntry ( )
default

References DirEntry().

◆ DirEntry() [1/3]

DirEntry::DirEntry ( const DirEntry & de)

Definition at line 42 of file dir.cpp.

42 : p(std::make_unique<Private>())
43{
44 p->entry = de.p->entry;
45}
std::unique_ptr< Private > p
Definition dir.h:38

References DirEntry(), and p.

Referenced by DirEntry(), DirEntry(), operator=(), operator=(), and ~DirEntry().

◆ DirEntry() [2/3]

DirEntry::DirEntry ( DirEntry && de)

Definition at line 57 of file dir.cpp.

57 : p(std::make_unique<Private>())
58{
59 p = std::move(de.p);
60}

References DirEntry(), and p.

◆ DirEntry() [3/3]

DirEntry::DirEntry ( )
private

Definition at line 38 of file dir.cpp.

38 : p(std::make_unique<Private>())
39{
40}

References p.

Member Function Documentation

◆ is_directory()

bool DirEntry::is_directory ( ) const

Definition at line 70 of file dir.cpp.

71{
72 return p->entry.is_directory();
73}

References p.

◆ is_regular_file()

bool DirEntry::is_regular_file ( ) const

Definition at line 75 of file dir.cpp.

76{
77 return p->entry.is_regular_file();
78}

References p.

◆ is_symlink()

bool DirEntry::is_symlink ( ) const

Definition at line 80 of file dir.cpp.

81{
82 return p->entry.is_symlink();
83}

References p.

◆ operator=() [1/2]

DirEntry & DirEntry::operator= ( const DirEntry & de)

Definition at line 47 of file dir.cpp.

48{
49 if (this!=&de)
50 {
51 p = std::make_unique<Private>();
52 p->entry = de.p->entry;
53 }
54 return *this;
55}

References DirEntry(), and p.

◆ operator=() [2/2]

DirEntry & DirEntry::operator= ( DirEntry && de)

Definition at line 62 of file dir.cpp.

63{
64 p = std::move(de.p);
65 return *this;
66}

References DirEntry(), and p.

◆ path()

std::string DirEntry::path ( ) const

Definition at line 85 of file dir.cpp.

86{
87 return fromFsPath(p->entry.path());
88}
std::string fromFsPath(const fs::path &p)
Converts a path into a UTF-8 encoded string.
Definition fswrapper.h:78

References fromFsPath(), and p.

◆ DirIterator

friend class DirIterator
friend

Definition at line 35 of file dir.h.

References DirIterator.

Referenced by DirIterator.

Member Data Documentation

◆ p

std::unique_ptr<Private> DirEntry::p
private

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