Package | Description |
---|---|
nl.esciencecenter.octopus.engine.files | |
nl.esciencecenter.octopus.engine.jobs | |
nl.esciencecenter.octopus.files |
This package contains classes and interfaces which are used to provide advanced input
and output.
|
nl.esciencecenter.octopus.jobs |
This package contains the classes and interfaces used to run jobs.
|
nl.esciencecenter.octopus.util |
Modifier and Type | Class and Description |
---|---|
class |
PathCpi
Default implementation of Path.
|
Modifier and Type | Field and Description |
---|---|
private Path |
AbstractPathAttributes.path |
Modifier and Type | Method and Description |
---|---|
Path |
FilesEngine.copy(Path source,
Path target,
CopyOption... options) |
Path |
FilesAdaptor.copy(Path source,
Path target,
CopyOption... options)
Copy a file to a target file.
|
Path |
FilesEngine.createDirectories(Path dir,
Set<PosixFilePermission> permissions) |
Path |
FilesAdaptor.createDirectories(Path dir,
Set<PosixFilePermission> permissions)
Creates a directory by creating all nonexistent parent directories first.
|
Path |
FilesEngine.createDirectory(Path dir,
Set<PosixFilePermission> permissions) |
Path |
FilesAdaptor.createDirectory(Path dir,
Set<PosixFilePermission> permissions)
Creates a new directory.
|
Path |
FilesEngine.createFile(Path path,
Set<PosixFilePermission> permissions) |
Path |
FilesAdaptor.createFile(Path path,
Set<PosixFilePermission> permissions)
Creates a new and empty file, failing if the file already exists.
|
Path |
FilesEngine.createSymbolicLink(Path link,
Path target) |
Path |
FilesAdaptor.createSymbolicLink(Path link,
Path target)
Creates a symbolic link to a target (optional operation).
|
Path |
PathCpi.getFileName() |
Path |
PathCpi.getName(int index) |
Path |
PathCpi.getParent() |
Path |
PathCpi.getRoot() |
Path |
FilesEngine.move(Path source,
Path target,
CopyOption... options) |
Path |
FilesAdaptor.move(Path source,
Path target,
CopyOption... options)
Move or rename a file to a target file.
|
Path |
FilesAdaptor.newPath(ImmutableTypedProperties properties,
Credentials credentials,
URI location) |
Path |
FilesEngine.newPath(Properties properties,
Credentials credentials,
URI location) |
Path |
FilesEngine.newPath(URI location) |
Path |
PathCpi.PathIterator.next() |
Path |
PathCpi.normalize() |
Path |
AbstractPathAttributes.path() |
Path |
FilesEngine.readSymbolicLink(Path link) |
Path |
FilesAdaptor.readSymbolicLink(Path link)
Reads the target of a symbolic link (optional operation).
|
Path |
PathCpi.relativize(Path other) |
Path |
PathCpi.resolve(Path other) |
Path |
PathCpi.resolve(String other) |
Path |
PathCpi.resolveSibling(Path other) |
Path |
PathCpi.resolveSibling(String other) |
Path |
FilesAdaptor.setFileTimes(Path path,
long lastModifiedTime,
long lastAccessTime,
long createTime)
Updates a file's last modified, last access, and create time attribute.
|
Path |
FilesAdaptor.setOwner(Path path,
String owner,
String group)
Updates the file owner and group.
|
Path |
FilesAdaptor.setPosixFilePermissions(Path path,
Set<PosixFilePermission> permissions)
Sets a file's POSIX permissions.
|
Path |
PathCpi.subpath(int beginIndex,
int endIndex) |
Path |
PathCpi.toAbsolutePath() |
Modifier and Type | Method and Description |
---|---|
Iterator<Path> |
PathCpi.iterator() |
DirectoryStream<Path> |
FilesEngine.newDirectoryStream(Path dir) |
DirectoryStream<Path> |
FilesEngine.newDirectoryStream(Path dir,
DirectoryStream.Filter filter) |
DirectoryStream<Path> |
FilesAdaptor.newDirectoryStream(Path dir,
DirectoryStream.Filter filter)
Opens a directory, returning a DirectoryStream to iterate over the
entries in the directory.
|
Modifier and Type | Method and Description |
---|---|
int |
PathCpi.compareTo(Path other) |
Path |
FilesEngine.copy(Path source,
Path target,
CopyOption... options) |
Path |
FilesAdaptor.copy(Path source,
Path target,
CopyOption... options)
Copy a file to a target file.
|
Path |
FilesEngine.createDirectories(Path dir,
Set<PosixFilePermission> permissions) |
Path |
FilesAdaptor.createDirectories(Path dir,
Set<PosixFilePermission> permissions)
Creates a directory by creating all nonexistent parent directories first.
|
Path |
FilesEngine.createDirectory(Path dir,
Set<PosixFilePermission> permissions) |
Path |
FilesAdaptor.createDirectory(Path dir,
Set<PosixFilePermission> permissions)
Creates a new directory.
|
Path |
FilesEngine.createFile(Path path,
Set<PosixFilePermission> permissions) |
Path |
FilesAdaptor.createFile(Path path,
Set<PosixFilePermission> permissions)
Creates a new and empty file, failing if the file already exists.
|
Path |
FilesEngine.createSymbolicLink(Path link,
Path target) |
Path |
FilesAdaptor.createSymbolicLink(Path link,
Path target)
Creates a symbolic link to a target (optional operation).
|
void |
FilesEngine.delete(Path path,
DeleteOption... options) |
void |
FilesAdaptor.delete(Path path,
DeleteOption... options)
Deletes a file.
|
boolean |
FilesEngine.deleteIfExists(Path path,
DeleteOption... options) |
boolean |
FilesAdaptor.deleteIfExists(Path path,
DeleteOption... options)
Deletes a file if it exists.
|
boolean |
PathCpi.endsWith(Path other) |
boolean |
FilesEngine.exists(Path path) |
boolean |
FilesAdaptor.exists(Path path)
Tests whether a file exists.
|
private Adaptor |
FilesEngine.getAdaptor(Path path) |
boolean |
FilesEngine.isDirectory(Path path) |
boolean |
FilesAdaptor.isDirectory(Path path)
Tests whether a file is a directory.
|
Path |
FilesEngine.move(Path source,
Path target,
CopyOption... options) |
Path |
FilesAdaptor.move(Path source,
Path target,
CopyOption... options)
Move or rename a file to a target file.
|
DirectoryStream<PathAttributes> |
FilesEngine.newAttributesDirectoryStream(Path dir) |
DirectoryStream<PathAttributes> |
FilesEngine.newAttributesDirectoryStream(Path dir,
DirectoryStream.Filter filter) |
DirectoryStream<PathAttributes> |
FilesAdaptor.newAttributesDirectoryStream(Path dir,
DirectoryStream.Filter filter)
Opens a directory, returning a DirectoryStream to iterate over the
entries in the directory.
|
SeekableByteChannel |
FilesEngine.newByteChannel(Path path,
OpenOption... options) |
SeekableByteChannel |
FilesEngine.newByteChannel(Path path,
Set<PosixFilePermission> permissions,
OpenOption... options) |
SeekableByteChannel |
FilesAdaptor.newByteChannel(Path path,
Set<PosixFilePermission> permissions,
OpenOption... options)
Opens or creates a file, returning a seekable byte channel to access the
file.
|
DirectoryStream<Path> |
FilesEngine.newDirectoryStream(Path dir) |
DirectoryStream<Path> |
FilesEngine.newDirectoryStream(Path dir,
DirectoryStream.Filter filter) |
DirectoryStream<Path> |
FilesAdaptor.newDirectoryStream(Path dir,
DirectoryStream.Filter filter)
Opens a directory, returning a DirectoryStream to iterate over the
entries in the directory.
|
InputStream |
FilesEngine.newInputStream(Path path) |
InputStream |
FilesAdaptor.newInputStream(Path path)
Opens a file, returning an input stream to read from the file.
|
OutputStream |
FilesEngine.newOutputStream(Path path,
OpenOption... options) |
OutputStream |
FilesAdaptor.newOutputStream(Path path,
OpenOption... options)
Opens or creates a file, returning an output stream that may be used to
write bytes to the file.
|
FileAttributes |
FilesEngine.readAttributes(Path path) |
FileAttributes |
FilesAdaptor.readAttributes(Path path)
Reads a file's attributes.
|
Path |
FilesEngine.readSymbolicLink(Path link) |
Path |
FilesAdaptor.readSymbolicLink(Path link)
Reads the target of a symbolic link (optional operation).
|
Path |
PathCpi.relativize(Path other) |
Path |
PathCpi.resolve(Path other) |
Path |
PathCpi.resolveSibling(Path other) |
void |
FilesEngine.setAcl(Path path,
List<AclEntry> acl) |
void |
FilesAdaptor.setAcl(Path path,
List<AclEntry> acl)
Updates (replace) the access control list.
|
void |
FilesEngine.setFileTimes(Path path,
long lastModifiedTime,
long lastAccessTime,
long createTime) |
Path |
FilesAdaptor.setFileTimes(Path path,
long lastModifiedTime,
long lastAccessTime,
long createTime)
Updates a file's last modified, last access, and create time attribute.
|
void |
FilesEngine.setOwner(Path path,
String owner,
String group) |
Path |
FilesAdaptor.setOwner(Path path,
String owner,
String group)
Updates the file owner and group.
|
void |
FilesEngine.setPosixFilePermissions(Path path,
Set<PosixFilePermission> permissions) |
Path |
FilesAdaptor.setPosixFilePermissions(Path path,
Set<PosixFilePermission> permissions)
Sets a file's POSIX permissions.
|
boolean |
PathCpi.startsWith(Path other) |
Constructor and Description |
---|
AbstractPathAttributes(Path path,
FileAttributes attributes) |
Modifier and Type | Field and Description |
---|---|
private Path |
Sandbox.directory |
Modifier and Type | Method and Description |
---|---|
Path |
Sandbox.getStderr() |
Path |
Sandbox.getStdin() |
Path |
Sandbox.getStdout() |
Constructor and Description |
---|
Sandbox(JobDescription description,
OctopusEngine engine,
Path sandboxRoot) |
Modifier and Type | Method and Description |
---|---|
Path |
Files.copy(Path source,
Path target,
CopyOption... options)
Copy a file to a target file.
|
Path |
Files.createDirectories(Path dir,
Set<PosixFilePermission> permissions)
Creates a directory by creating all nonexistent parent directories first.
|
Path |
Files.createDirectory(Path dir,
Set<PosixFilePermission> permissions)
Creates a new directory.
|
Path |
Files.createFile(Path path,
Set<PosixFilePermission> permissions)
Creates a new and empty file, failing if the file already exists.
|
Path |
Files.createSymbolicLink(Path link,
Path target)
Creates a symbolic link to a target (optional operation).
|
Path |
Path.getFileName() |
Path |
Path.getName(int index) |
Path |
Path.getParent() |
Path |
Path.getRoot() |
Path |
Files.move(Path source,
Path target,
CopyOption... options)
Move or rename a file to a target file.
|
Path |
Files.newPath(Properties properties,
Credentials credentials,
URI location) |
Path |
Files.newPath(URI location) |
Path |
Path.normalize() |
Path |
PathAttributes.path() |
Path |
Files.readSymbolicLink(Path link)
Reads the target of a symbolic link (optional operation).
|
Path |
Path.relativize(Path other) |
Path |
Path.resolve(Path other) |
Path |
Path.resolve(String other) |
Path |
Path.resolveSibling(Path other) |
Path |
Path.resolveSibling(String other) |
Path |
Path.subpath(int beginIndex,
int endIndex) |
Path |
Path.toAbsolutePath()
Note: this will most likely only work for local files
|
Modifier and Type | Method and Description |
---|---|
Iterator<Path> |
Path.iterator() |
DirectoryStream<Path> |
Files.newDirectoryStream(Path dir)
Opens a directory, returning a DirectoryStream to iterate over all
entries in the directory.
|
DirectoryStream<Path> |
Files.newDirectoryStream(Path dir,
DirectoryStream.Filter filter)
Opens a directory, returning a DirectoryStream to iterate over the
entries in the directory.
|
Modifier and Type | Method and Description |
---|---|
boolean |
DirectoryStream.Filter.accept(Path entry)
Decides if the given directory entry should be accepted or filtered.
|
int |
Path.compareTo(Path other) |
Path |
Files.copy(Path source,
Path target,
CopyOption... options)
Copy a file to a target file.
|
Path |
Files.createDirectories(Path dir,
Set<PosixFilePermission> permissions)
Creates a directory by creating all nonexistent parent directories first.
|
Path |
Files.createDirectory(Path dir,
Set<PosixFilePermission> permissions)
Creates a new directory.
|
Path |
Files.createFile(Path path,
Set<PosixFilePermission> permissions)
Creates a new and empty file, failing if the file already exists.
|
Path |
Files.createSymbolicLink(Path link,
Path target)
Creates a symbolic link to a target (optional operation).
|
void |
Files.delete(Path path,
DeleteOption... options)
Deletes a file.
|
boolean |
Files.deleteIfExists(Path path,
DeleteOption... options)
Deletes a file if it exists.
|
boolean |
Path.endsWith(Path other) |
boolean |
Files.exists(Path path)
Tests whether a file exists.
|
boolean |
Files.isDirectory(Path path)
Tests whether a file is a directory.
|
Path |
Files.move(Path source,
Path target,
CopyOption... options)
Move or rename a file to a target file.
|
DirectoryStream<PathAttributes> |
Files.newAttributesDirectoryStream(Path dir)
Opens a directory, returning a DirectoryStream to iterate over all
entries in the directory.
|
DirectoryStream<PathAttributes> |
Files.newAttributesDirectoryStream(Path dir,
DirectoryStream.Filter filter)
Opens a directory, returning a DirectoryStream to iterate over the
entries in the directory.
|
SeekableByteChannel |
Files.newByteChannel(Path path,
OpenOption... options)
Opens or creates a file, returning a seekable byte channel to access the
file.
|
SeekableByteChannel |
Files.newByteChannel(Path path,
Set<PosixFilePermission> permissions,
OpenOption... options)
Opens or creates a file, returning a seekable byte channel to access the
file.
|
DirectoryStream<Path> |
Files.newDirectoryStream(Path dir)
Opens a directory, returning a DirectoryStream to iterate over all
entries in the directory.
|
DirectoryStream<Path> |
Files.newDirectoryStream(Path dir,
DirectoryStream.Filter filter)
Opens a directory, returning a DirectoryStream to iterate over the
entries in the directory.
|
InputStream |
Files.newInputStream(Path path)
Opens a file, returning an input stream to read from the file.
|
OutputStream |
Files.newOutputStream(Path path,
OpenOption... options)
Opens or creates a file, returning an output stream that may be used to
write bytes to the file.
|
FileAttributes |
Files.readAttributes(Path path)
Reads a file's attributes.
|
Path |
Files.readSymbolicLink(Path link)
Reads the target of a symbolic link (optional operation).
|
Path |
Path.relativize(Path other) |
Path |
Path.resolve(Path other) |
Path |
Path.resolveSibling(Path other) |
void |
Files.setAcl(Path path,
List<AclEntry> acl)
Updates (replace) the access control list.
|
void |
Files.setFileTimes(Path path,
long lastModifiedTime,
long lastAccessTime,
long createTime)
Updates a file's last modified, last access, and create time attribute.
|
void |
Files.setOwner(Path path,
String user,
String group)
Updates the file owner and group.
|
void |
Files.setPosixFilePermissions(Path path,
Set<PosixFilePermission> permissions)
Sets a file's POSIX permissions.
|
boolean |
Path.startsWith(Path other) |
Modifier and Type | Field and Description |
---|---|
private Path |
JobDescription.stderr |
private Path |
JobDescription.stdin |
private Path |
JobDescription.stdout |
Modifier and Type | Field and Description |
---|---|
private Map<Path,Path> |
JobDescription.postStagedFiles |
private Map<Path,Path> |
JobDescription.postStagedFiles |
private Map<Path,Path> |
JobDescription.preStagedFiles |
private Map<Path,Path> |
JobDescription.preStagedFiles |
Modifier and Type | Method and Description |
---|---|
Path |
JobDescription.getStderr()
Returns the stderr
Path . |
Path |
JobDescription.getStdin()
Returns the stdin
Path . |
Path |
JobDescription.getStdout()
Returns the stdout
Path . |
Modifier and Type | Method and Description |
---|---|
Map<Path,Path> |
JobDescription.getPostStagedFiles()
Returns the post stage file set.
|
Map<Path,Path> |
JobDescription.getPostStagedFiles()
Returns the post stage file set.
|
Map<Path,Path> |
JobDescription.getPreStagedFiles()
Returns the pre staged file set.
|
Map<Path,Path> |
JobDescription.getPreStagedFiles()
Returns the pre staged file set.
|
Modifier and Type | Method and Description |
---|---|
void |
JobDescription.addPostStagedFiles(Path src)
Add a single post stage file.
|
void |
JobDescription.addPostStagedFiles(Path src,
Path dest)
Add a single post stage file that should be post staged to the given
destination.
|
void |
JobDescription.addPreStagedFile(Path src)
Add a single pre stage file.
|
void |
JobDescription.addPreStagedFile(Path src,
Path dest)
Add a single pre stage file that should be pre staged to the given
destination.
|
void |
JobDescription.setPostStagedFiles(Path... files)
Sets the post staged file set.
|
void |
JobDescription.setPreStagedFiles(Path... files)
Sets the pre staged file set.
|
void |
JobDescription.setStderr(Path stderr)
Sets the stderr
Path . |
void |
JobDescription.setStdin(Path stdin)
Sets the
Path where stdin is redirected from. |
void |
JobDescription.setStdout(Path stdout)
Sets the stdout
Path . |
Modifier and Type | Method and Description |
---|---|
static Path |
FileUtils.walkFileTree(Octopus octopus,
Path start,
boolean followLinks,
int maxDepth,
FileVisitor visitor)
Walks a file tree.
|
static Path |
FileUtils.walkFileTree(Octopus octopus,
Path start,
FileVisitor visitor)
Walks a file tree.
|
static Path |
FileUtils.write(Octopus octopus,
Path path,
byte[] bytes,
OpenOption... options)
Writes bytes to a file.
|
static Path |
FileUtils.write(Octopus octopus,
Path path,
Iterable<? extends CharSequence> lines,
Charset cs,
OpenOption... options)
Write lines of text to a file.
|
Modifier and Type | Method and Description |
---|---|
static long |
FileUtils.copy(Octopus octopus,
InputStream in,
Path target,
CopyOption... options)
Copies all bytes from an input stream to a file.
|
static long |
FileUtils.copy(Octopus octopus,
Path source,
OutputStream out)
Copies all bytes from a file to an output stream.
|
static BufferedReader |
FileUtils.newBufferedReader(Octopus octopus,
Path path,
Charset cs)
Opens a file for reading, returning a BufferedReader that may be used to
read text from the file in an efficient manner.
|
static BufferedWriter |
FileUtils.newBufferedWriter(Octopus octopus,
Path path,
Charset cs,
OpenOption... options)
Opens or creates a file for writing, returning a BufferedWriter that may
be used to write text to the file in an efficient manner.
|
FileVisitResult |
FileVisitor.postVisitDirectory(Path dir,
OctopusException exception,
Octopus octopus)
Invoked for a directory after entries in the directory, and all of their
descendants, have been visited.
|
FileVisitResult |
FileVisitor.preVisitDirectory(Path dir,
FileAttributes attributes,
Octopus octopus)
Invoked for a directory before entries in the directory are visited.
|
static byte[] |
FileUtils.readAllBytes(Octopus octopus,
Path path)
Read all the bytes from a file.
|
static List<String> |
FileUtils.readAllLines(Octopus octopus,
Path path,
Charset cs)
Read all lines from a file.
|
FileVisitResult |
FileVisitor.visitFile(Path file,
FileAttributes attributes,
Octopus octopus)
Invoked for a file in a directory.
|
FileVisitResult |
FileVisitor.visitFileFailed(Path file,
OctopusException exception,
Octopus octopus)
Invoked for a file that could not be visited.
|
private static FileVisitResult |
FileUtils.walk(Octopus octopus,
Path path,
FileAttributes attributes,
boolean followLinks,
int maxDepth,
FileVisitor visitor) |
static Path |
FileUtils.walkFileTree(Octopus octopus,
Path start,
boolean followLinks,
int maxDepth,
FileVisitor visitor)
Walks a file tree.
|
static Path |
FileUtils.walkFileTree(Octopus octopus,
Path start,
FileVisitor visitor)
Walks a file tree.
|
static Path |
FileUtils.write(Octopus octopus,
Path path,
byte[] bytes,
OpenOption... options)
Writes bytes to a file.
|
static Path |
FileUtils.write(Octopus octopus,
Path path,
Iterable<? extends CharSequence> lines,
Charset cs,
OpenOption... options)
Write lines of text to a file.
|