From 4ce0d8800f1aaabe82f7a61faf1d5609b69c38cf Mon Sep 17 00:00:00 2001 From: Ulf Adams Date: Fri, 24 Apr 2015 16:10:16 +0000 Subject: Inline/remove some calls to FoundationTestCase.scratchFS(). -- MOS_MIGRATED_REVID=91987064 --- .../java/com/google/devtools/build/lib/testutil/Scratch.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/test/java/com/google/devtools/build/lib/testutil') 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; @@ -87,6 +88,15 @@ public final class Scratch { return workingDir.getRelative(pathName); } + /** + * 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. */ -- cgit v1.2.3