パッケージ io.digdag.util
クラス Workspace
- java.lang.Object
-
- io.digdag.util.Workspace
-
- すべての実装されたインタフェース:
java.io.Closeable,java.lang.AutoCloseable
public class Workspace extends java.lang.Object implements java.io.Closeable
-
-
ネストされたクラスの概要
ネストされたクラス 修飾子とタイプ クラス 説明 static interfaceWorkspace.ExceptionFactory<E>
-
メソッドの概要
すべてのメソッド staticメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 voidclose()java.nio.file.PathcreateTempDir(java.lang.String prefix)Create new directory and return the absolute pathjava.nio.file.PathcreateTempFile(java.lang.String prefix, java.lang.String suffix)Create new file and return the absolute pathjava.io.FilegetFile(java.lang.String relative)java.nio.file.PathgetPath()java.nio.file.PathgetPath(java.lang.String fileName)java.nio.file.PathgetProjectPath()java.io.BufferedReadernewBufferedReader(java.lang.String fileName, java.nio.charset.Charset cs)java.io.BufferedWriternewBufferedWriter(java.lang.String fileName, java.nio.charset.Charset cs)java.io.InputStreamnewInputStream(java.lang.String fileName)java.io.OutputStreamnewOutputStream(java.lang.String fileName)static Workspaceof(java.nio.file.Path projectPath, java.lang.String workdir)static WorkspaceofTaskRequest(java.nio.file.Path projectPath, io.digdag.spi.TaskRequest taskRequest)static <E extends java.lang.RuntimeException>
EpropagateIoException(java.io.IOException ex, java.lang.String fileName, Workspace.ExceptionFactory<E> factory)java.lang.StringtemplateCommand(io.digdag.spi.TemplateEngine templateEngine, io.digdag.client.config.Config params, java.lang.String aliasKey, java.nio.charset.Charset fileCharset)java.lang.StringtemplateFile(io.digdag.spi.TemplateEngine templateEngine, java.lang.String fileName, java.nio.charset.Charset fileCharset, io.digdag.client.config.Config params)
-
-
-
メソッドの詳細
-
ofTaskRequest
public static Workspace ofTaskRequest(java.nio.file.Path projectPath, io.digdag.spi.TaskRequest taskRequest)
-
of
public static Workspace of(java.nio.file.Path projectPath, java.lang.String workdir)
-
getProjectPath
public java.nio.file.Path getProjectPath()
-
getPath
public java.nio.file.Path getPath()
-
getPath
public java.nio.file.Path getPath(java.lang.String fileName)
-
getFile
public java.io.File getFile(java.lang.String relative)
-
createTempDir
public java.nio.file.Path createTempDir(java.lang.String prefix) throws java.io.IOExceptionCreate new directory and return the absolute path- パラメータ:
prefix-- 戻り値:
- 例外:
java.io.IOException
-
createTempFile
public java.nio.file.Path createTempFile(java.lang.String prefix, java.lang.String suffix) throws java.io.IOExceptionCreate new file and return the absolute path- パラメータ:
prefix-suffix-- 戻り値:
- 例外:
java.io.IOException
-
newInputStream
public java.io.InputStream newInputStream(java.lang.String fileName) throws java.io.IOException- 例外:
java.io.IOException
-
newBufferedReader
public java.io.BufferedReader newBufferedReader(java.lang.String fileName, java.nio.charset.Charset cs) throws java.io.IOException- 例外:
java.io.IOException
-
newOutputStream
public java.io.OutputStream newOutputStream(java.lang.String fileName) throws java.io.IOException- 例外:
java.io.IOException
-
newBufferedWriter
public java.io.BufferedWriter newBufferedWriter(java.lang.String fileName, java.nio.charset.Charset cs) throws java.io.IOException- 例外:
java.io.IOException
-
templateFile
public java.lang.String templateFile(io.digdag.spi.TemplateEngine templateEngine, java.lang.String fileName, java.nio.charset.Charset fileCharset, io.digdag.client.config.Config params) throws java.io.IOException, io.digdag.spi.TemplateException- 例外:
java.io.IOExceptionio.digdag.spi.TemplateException
-
templateCommand
public java.lang.String templateCommand(io.digdag.spi.TemplateEngine templateEngine, io.digdag.client.config.Config params, java.lang.String aliasKey, java.nio.charset.Charset fileCharset)
-
close
public void close()
- 定義:
closeインタフェース内java.lang.AutoCloseable- 定義:
closeインタフェース内java.io.Closeable
-
propagateIoException
public static <E extends java.lang.RuntimeException> E propagateIoException(java.io.IOException ex, java.lang.String fileName, Workspace.ExceptionFactory<E> factory)
-
-