MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / open

Method open

libraries/LocalPeer/src/LockedFile.cpp:123–130  ·  view source on GitHub ↗

! Opens the file in OpenMode \a mode. This is identical to QFile::open(), with the one exception that the Truncate mode flag is disallowed. Truncation would conflict with the advisory file locking, since the file would be modified before the write lock is obtained. If truncation is required, use resize(0) after obtaining the write lock. Returns true if successful; otherwise false. \sa QFile::op

Source from the content-addressed store, hash-verified

121\sa QFile::open(), QFile::resize()
122*/
123bool LockedFile::open(OpenMode mode)
124{
125 if (mode & QIODevice::Truncate) {
126 qWarning("QtLockedFile::open(): Truncate mode not allowed.");
127 return false;
128 }
129 return QFile::open(mode);
130}
131
132/*!
133 Returns \e true if this object has a in read or write lock;

Callers 15

read_legacy_releaseMethod · 0.80
LocalPeerMethod · 0.80
processZipPackMethod · 0.80
ApplicationMethod · 0.80
installUpdatesMethod · 0.80
mergeZipFilesMethod · 0.80
compressDirFilesMethod · 0.80
createModdedJarMethod · 0.80
extractDirMethod · 0.80
extractFileMethod · 0.80
writeFunction · 0.80
readFunction · 0.80

Calls

no outgoing calls

Tested by 2

readJsonMethod · 0.64
writeJsonMethod · 0.64