aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java
diff options
context:
space:
mode:
authorGravatar Eric Fellheimer <felly@google.com>2015-08-26 23:08:30 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2015-08-27 14:44:57 +0000
commit1d564dffdb024dfc231f04e9eaec8a472312b307 (patch)
tree5a5305737ebe775b65f74f1046566acf915c01a0 /src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java
parent3a8ddcc6fa655ca9a3cc8f02ef7ba13f06cba14e (diff)
Expose the #asByteSource() method in FileSystemUtils.
-- MOS_MIGRATED_REVID=101628787
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java b/src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java
index 840433a11e..cd0702e16f 100644
--- a/src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java
+++ b/src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java
@@ -424,7 +424,10 @@ public class FileSystemUtils {
}
}
- private static ByteSource asByteSource(final Path path) {
+ /**
+ * Return the path as a ByteSource.
+ */
+ public static ByteSource asByteSource(final Path path) {
return new ByteSource() {
@Override public InputStream openStream() throws IOException {
return path.getInputStream();