MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / SetReadOnly

Method SetReadOnly

Source/Engine/Platform/Android/AndroidFileSystem.cpp:288–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286}
287
288bool AndroidFileSystem::SetReadOnly(const StringView& path, bool isReadOnly)
289{
290 const StringAsANSI<> pathANSI(*path, path.Length());
291 struct stat fileInfo;
292 if (stat(pathANSI.Get(), &fileInfo) != -1)
293 {
294 if (isReadOnly)
295 {
296 fileInfo.st_mode &= ~S_IWUSR;
297 }
298 else
299 {
300 fileInfo.st_mode |= S_IWUSR;
301 }
302 return chmod(pathANSI.Get(), fileInfo.st_mode) == 0;
303 }
304 return false;
305}
306
307bool AndroidFileSystem::MoveFile(const StringView& dst, const StringView& src, bool overwrite)
308{

Callers

nothing calls this directly

Calls 3

statClass · 0.70
LengthMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected