MCPcopy Create free account
hub / github.com/davidgiven/luje / canRead

Method canRead

lib/java/io/File.java:318–328  ·  view source on GitHub ↗

Indicates whether the current context is allowed to read from this file. @return true if this file can be read, false otherwise. @throws SecurityException if a SecurityManager is installed and it denies the read request.

()

Source from the content-addressed store, hash-verified

316 * read request.
317 */
318 public boolean canRead() {
319 if (path.length() == 0) {
320 return false;
321 }
322// SecurityManager security = System.getSecurityManager();
323// if (security != null) {
324// security.checkRead(path);
325// }
326 byte[] pp = properPath(true);
327 return existsImpl(pp) && !isWriteOnlyImpl(pp);
328 }
329
330 /**
331 * Indicates whether the current context is allowed to write to this file.

Callers

nothing calls this directly

Calls 4

properPathMethod · 0.95
existsImplMethod · 0.95
isWriteOnlyImplMethod · 0.95
lengthMethod · 0.65

Tested by

no test coverage detected