MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / hasWriteAccess

Method hasWriteAccess

JUCE/modules/juce_core/native/juce_win32_Files.cpp:188–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188bool File::hasWriteAccess() const
189{
190 if (fullPath.isEmpty())
191 return true;
192
193 auto attr = WindowsFileHelpers::getAtts (fullPath);
194
195 // NB: According to MS, the FILE_ATTRIBUTE_READONLY attribute doesn't work for
196 // folders, and can be incorrectly set for some special folders, so we'll just say
197 // that folders are always writable.
198 return attr == INVALID_FILE_ATTRIBUTES
199 || (attr & FILE_ATTRIBUTE_DIRECTORY) != 0
200 || (attr & FILE_ATTRIBUTE_READONLY) == 0;
201}
202
203bool File::setFileReadOnlyInternal (bool shouldBeReadOnly) const
204{

Callers 10

setBundleInfoMethod · 0.45
setBundleInfoCarbonMethod · 0.45
savePanelMethod · 0.45
savePanelVersionedMethod · 0.45
exportPanelMethod · 0.45
savePanelBinMethod · 0.45
savePanelXmlMethod · 0.45
runTestMethod · 0.45

Calls 2

getAttsFunction · 0.85
isEmptyMethod · 0.45

Tested by

no test coverage detected