MCPcopy Create free account
hub / github.com/ashkulz/NppFTP / ProfileObject

Method ProfileObject

src/Windows/ProfileObject.cpp:29–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27bool ProfileObject::m_debug = FALSE;
28
29ProfileObject::ProfileObject(const char* path, bool _isDir, bool _isLink) :
30 m_profile(NULL),
31 m_isDir(_isDir),
32 m_isLink(_isLink),
33 m_isRoot(false),
34 m_childCount(0),
35 m_children(),
36 m_parent(NULL),
37 m_needRefresh(!_isDir), //refresh only required for dirs
38 m_data(NULL),
39 m_size(-1)
40{
41 size_t len = strlen(path) + 1;
42 m_path = new char[len];
43 strcpy(m_path, path);
44
45 m_name = strrchr(m_path, '/');
46 if (m_name[1] != 0) //root directory case
47 {
48 m_name++; //skip slash
49 }
50
51 m_localName = SU::Utf8ToTChar(m_name);
52
53 FILETIME ft;
54 SYSTEMTIME st;
55
56 ::GetSystemTime(&st);
57 ::SystemTimeToFileTime(&st, &ft);
58
59 m_ctime = ft;
60 m_mtime = ft;
61 m_atime = ft;
62}
63
64ProfileObject::ProfileObject(const char* path, const char* name, bool _isDir, FTPProfile* profile) :
65 m_profile(profile),

Callers

nothing calls this directly

Calls 1

clearMethod · 0.80

Tested by

no test coverage detected