Package com._1c.g5.v8.dt.export
Interface IExportArtifactBuilder
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
OrdinaryDirectoryBuilder
,ZipArchiveBuilder
Builds export artifact. Export artifact is an abstraction for directory-like structures. Actual artifact can be an
ordinary directory or an archive file residing on the local file system as well as some in-memory data structure.
Implementations must be thread-safe.
Method close
must be invoked after building is completed.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Copies a file or directory residing on the local file system into the artifact.newOutputStream
(Path path) Creates an output stream for writing a file inside the artifact.
-
Method Details
-
newOutputStream
Creates an output stream for writing a file inside the artifact. All nonexistent directories are created automatically. The returned stream does not need wrapping intoBufferedOutputStream
. If the given path already exists, the behavior of this method is not defined.- Parameters:
path
- The path to the file inside the artifact. May not benull
.- Returns:
- a new output stream. Never
null
. - Throws:
IOException
- if any I/O error occurs.
-
copy
Copies a file or directory residing on the local file system into the artifact. All nonexistent directories are created automatically. If the given target path already exists, the behavior of this method is not defined.- Parameters:
sourcePath
- The path of the source file or directory residing on the local file system. May not benull
.targetPath
- The path of the target file or directory inside the artifact. May not benull
.- Throws:
IOException
- if any I/O error occurs.
-