Indicates whether the current context is allowed to write to this file. @return true if this file can be written, false otherwise. @throws SecurityException if a SecurityManager is installed and it denies the write request.
()
| 337 | * write request. |
| 338 | */ |
| 339 | public boolean canWrite() { |
| 340 | // SecurityManager security = System.getSecurityManager(); |
| 341 | // if (security != null) { |
| 342 | // security.checkWrite(path); |
| 343 | // } |
| 344 | |
| 345 | // Cannot use exists() since that does an unwanted read-check. |
| 346 | boolean exists = false; |
| 347 | if (path.length() > 0) { |
| 348 | exists = existsImpl(properPath(true)); |
| 349 | } |
| 350 | return exists && !isReadOnlyImpl(properPath(true)); |
| 351 | } |
| 352 | |
| 353 | /** |
| 354 | * Returns the relative sort ordering of the paths for this file and the |
nothing calls this directly
no test coverage detected