MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / FileWriteable

Method FileWriteable

cpp/src/platform/winRT/FileOpsImpl.cpp:87–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87bool FileOpsImpl::FileWriteable
88(
89 const string _filename
90 )
91{
92 WIN32_FILE_ATTRIBUTE_DATA fad = { 0 };
93
94
95 if (!FileExists(_filename)) {
96 /* check if the directory is writtable */
97 wstring wFileName(ozwdirname(_filename).begin(), ozwdirname(_filename).end());
98
99 if (0 == GetFileAttributesEx(wFileName.c_str(), GetFileExInfoStandard, &fad))
100 return false;
101 }
102 else {
103 wstring wFileName(_filename.begin(), _filename.end());
104
105 if (0 == GetFileAttributesEx(wFileName.c_str(), GetFileExInfoStandard, &fad))
106 return false;
107 }
108
109 return (fad.dwFileAttributes != INVALID_FILE_ATTRIBUTES &&
110 !(fad.dwFileAttributes & FILE_ATTRIBUTE_READONLY));
111
112}
113
114bool FileOpsImpl::FileRotate
115(

Callers

nothing calls this directly

Calls 3

beginMethod · 0.45
endMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected