diff options
author | 2017-11-29 10:17:12 -0800 | |
---|---|---|
committer | 2017-11-29 10:18:54 -0800 | |
commit | bdaf26ec0822f938c99766baa06fcf7fc67a7faf (patch) | |
tree | fc705934f728139cb3fc292794e3ed9181443555 /src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java | |
parent | d0227d3cfa9255b6b13d36edf5a2515e190e128f (diff) |
Remove some unused extension points.
RELNOTES: None.
PiperOrigin-RevId: 177326265
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.java | 22 |
1 files changed, 0 insertions, 22 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 c92e7a1b8b..064e4b2e16 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 @@ -220,28 +220,6 @@ public class FileSystemUtils { } /** - * Returns a new {@code PathFragment} formed by replacing the first, or all if - * {@code replaceAll} is true, {@code oldSegment} of {@code path} with {@code - * newSegment}. - */ - public static PathFragment replaceSegments(PathFragment path, - String oldSegment, String newSegment, boolean replaceAll) { - int count = path.segmentCount(); - for (int i = 0; i < count; i++) { - if (path.getSegment(i).equals(oldSegment)) { - path = PathFragment.create( - path.subFragment(0, i), - PathFragment.create(newSegment), - path.subFragment(i+1, count)); - if (!replaceAll) { - return path; - } - } - } - return path; - } - - /** * Returns a new {@code PathFragment} formed by appending the given string to the last path * segment of {@code path} without removing the extension. Returns null if {@code path} * has zero segments. |