* If the file is symlink (see {@link #readLink}), the mode is that of the link target, not the link itself.
* @return for example, 0644 ~ {@code rw-r--r--}; -1 by default, meaning unknown or inapplicable
* @throws IOException if checking the mode failed
* @since FIXME
*/
@Restricted(Beta.class)
publicintmode()throwsIOException{
return-1;
}
/**
* Checks whether this file can be read.
* @return true normally
...
...
@@ -208,6 +333,26 @@ public abstract class VirtualFile implements Comparable<VirtualFile>, Serializab
returncallable.call();
}
/**
* Optionally obtains a URL which may be used to retrieve file contents from any process on any node.
* For example, given cloud storage this might produce a permalink to the file.
* <p>This is only meaningful for {@link #isFile}:
* no ZIP etc. archiving protocol is defined to allow bulk access to directory trees.
* <p>Any necessary authentication must be encoded somehow into the URL itself;
* do not include any tokens or other authentication which might allow access to unrelated files
* (for example {@link ArtifactManager} builds from a different job).
* Authentication should be limited to download, not upload or any other modifications.
* <p>The URL might be valid for only a limited amount of time or even only a single use;
* this method should be called anew every time an external URL is required.
* @return an externally usable URL like {@code https://gist.githubusercontent.com/ACCT/GISTID/raw/COMMITHASH/FILE}, or null if there is no such support
<access-modifier-annotation.version>${access-modifier.version}</access-modifier-annotation.version><!-- differing only where needed for timestamped snapshots -->