diff options
author | Ulf Adams <ulfjack@google.com> | 2015-04-24 16:10:16 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@google.com> | 2015-04-27 18:48:26 +0000 |
commit | 4ce0d8800f1aaabe82f7a61faf1d5609b69c38cf (patch) | |
tree | f606c000cd8345a748d25562932fbd394f61da84 /src/test/java/com/google/devtools/build/lib/testutil/Scratch.java | |
parent | 8e38d8d3aa427ba59ab5e8e7521d5c934166e862 (diff) |
Inline/remove some calls to FoundationTestCase.scratchFS().
--
MOS_MIGRATED_REVID=91987064
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/testutil/Scratch.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/testutil/Scratch.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/testutil/Scratch.java b/src/test/java/com/google/devtools/build/lib/testutil/Scratch.java index f5785a342f..0d1f0818df 100644 --- a/src/test/java/com/google/devtools/build/lib/testutil/Scratch.java +++ b/src/test/java/com/google/devtools/build/lib/testutil/Scratch.java @@ -18,6 +18,7 @@ import com.google.devtools.build.lib.util.BlazeClock; import com.google.devtools.build.lib.vfs.FileSystem; import com.google.devtools.build.lib.vfs.FileSystemUtils; import com.google.devtools.build.lib.vfs.Path; +import com.google.devtools.build.lib.vfs.PathFragment; import com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem; import java.io.IOException; @@ -88,6 +89,15 @@ public final class Scratch { } /** + * Resolves {@code pathName} relative to the working directory. Note that this will not create any + * entity in the filesystem; i.e., the file that the object is describing may not exist in the + * filesystem. + */ + public Path resolve(PathFragment pathName) { + return workingDir.getRelative(pathName); + } + + /** * Create a directory in the scratch filesystem, with the given path name. */ public Path dir(String pathName) throws IOException { |