]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionResources.java
Improve publishing third parties.
[gpl/argeo-slc.git] / org.argeo.slc.api / src / org / argeo / slc / execution / ExecutionResources.java
1 package org.argeo.slc.execution;
2
3 import java.io.File;
4 import java.nio.file.Path;
5
6 /** Provides write access to resources during execution */
7 public interface ExecutionResources {
8 /** The base directory where this execution can write */
9 public File getWritableBaseDir();
10
11 /** Allocates a local file in the writable area and return it as a resource. */
12 public Path getWritableResource(String relativePath);
13
14 /**
15 * Allocates a local file in the writable area and return it as a fully
16 * qualified OS path.
17 */
18 public String getWritableOsPath(String relativePath);
19
20 /**
21 * Allocates a local file in the writable area and return it as a {@link File}.
22 */
23 public File getWritableOsFile(String relativePath);
24
25 /**
26 * Returns the resource as a file path. If the resource is not writable it is
27 * copied as a file in the writable area and the path to this local file is
28 * returned.
29 */
30 public String getAsOsPath(Path resource, Boolean overwrite);
31 }