-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdirectoryentry.cpp
More file actions
38 lines (31 loc) · 1.01 KB
/
Copy pathdirectoryentry.cpp
File metadata and controls
38 lines (31 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "common/path.h"
#include "common/directoryentry.h"
#include "common/private/directoryentry_p.h"
shelllet::common::DirectoryEntry::DirectoryEntry(Object* parent /*= nullptr*/)
:DirectoryEntry(*new DirectoryEntryPrivate, parent)
{
}
const shelllet::common::Path& shelllet::common::DirectoryEntry::path() const noexcept
{
Q_D(const DirectoryEntry);
static Path path;
path= d->entry->path();
return path;
}
shelllet::common::DirectoryEntry::DirectoryEntry(const std::filesystem::directory_entry& entry, Object* parent /*= nullptr*/)
: DirectoryEntry(*new DirectoryEntryPrivate, parent)
{
Q_D(DirectoryEntry);
d->entry.reset(new std::filesystem::directory_entry(entry));
}
shelllet::common::DirectoryEntry::operator const shelllet::common::Path& () const noexcept
{
Q_D(const DirectoryEntry);
static Path path;
path = d->entry->operator const std::filesystem::path &() ;
return path;
}
shelllet::common::DirectoryEntry::DirectoryEntry(DirectoryEntryPrivate& d, Object* parent /*= nullptr*/)
: Object(d, parent)
{
}