@Immutable public final class CloudStoragePath extends Object implements Path
Path
.UnixPath
Modifier and Type | Method and Description |
---|---|
String |
bucket()
Returns the Cloud Storage bucket name being served by this file system.
|
int |
compareTo(Path other) |
boolean |
endsWith(Path other) |
boolean |
endsWith(String other) |
boolean |
equals(Object other) |
CloudStoragePath |
getFileName() |
CloudStorageFileSystem |
getFileSystem() |
CloudStoragePath |
getName(int index) |
int |
getNameCount() |
CloudStoragePath |
getParent() |
CloudStoragePath |
getRoot() |
int |
hashCode() |
boolean |
isAbsolute() |
Iterator<Path> |
iterator() |
CloudStoragePath |
normalize()
Returns path without extra slashes or
. and .. and preserves trailing slash. |
WatchKey |
register(WatchService watcher,
WatchEvent.Kind<?>... events)
Throws
UnsupportedOperationException because this feature hasn't been implemented yet. |
WatchKey |
register(WatchService watcher,
WatchEvent.Kind<?>[] events,
WatchEvent.Modifier... modifiers)
Throws
UnsupportedOperationException because this feature hasn't been implemented yet. |
CloudStoragePath |
relativize(Path object) |
CloudStoragePath |
resolve(Path object) |
CloudStoragePath |
resolve(String other) |
CloudStoragePath |
resolveSibling(Path other) |
CloudStoragePath |
resolveSibling(String other) |
boolean |
startsWith(Path other) |
boolean |
startsWith(String other) |
CloudStoragePath |
subpath(int beginIndex,
int endIndex) |
CloudStoragePath |
toAbsolutePath()
Changes relative path to be absolute, using
workingDirectory as current dir. |
File |
toFile()
Throws
UnsupportedOperationException because Google Cloud Storage files are not backed
by the local file system. |
CloudStoragePath |
toRealPath(LinkOption... options)
Returns this path rewritten to the Cloud Storage object name that'd be used to perform i/o.
|
String |
toString() |
URI |
toUri() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public String bucket()
public CloudStorageFileSystem getFileSystem()
getFileSystem
in interface Path
@Nullable public CloudStoragePath getRoot()
public boolean isAbsolute()
isAbsolute
in interface Path
public CloudStoragePath toAbsolutePath()
workingDirectory
as current dir.toAbsolutePath
in interface Path
public CloudStoragePath toRealPath(LinkOption... options)
This method makes path absolute
and removes the prefix slash from
the absolute path when stripPrefixSlash
is
true
.
toRealPath
in interface Path
IllegalArgumentException
- if path contains extra slashes or dot-dirs when permitEmptyPathComponents
is false
, or if the resulting path is empty.public CloudStoragePath normalize()
.
and ..
and preserves trailing slash.public CloudStoragePath resolve(Path object)
public CloudStoragePath resolve(String other)
public CloudStoragePath resolveSibling(Path other)
resolveSibling
in interface Path
public CloudStoragePath resolveSibling(String other)
resolveSibling
in interface Path
public CloudStoragePath relativize(Path object)
relativize
in interface Path
@Nullable public CloudStoragePath getParent()
@Nullable public CloudStoragePath getFileName()
getFileName
in interface Path
public CloudStoragePath subpath(int beginIndex, int endIndex)
public int getNameCount()
getNameCount
in interface Path
public CloudStoragePath getName(int index)
public boolean startsWith(Path other)
startsWith
in interface Path
public boolean startsWith(String other)
startsWith
in interface Path
public WatchKey register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers)
UnsupportedOperationException
because this feature hasn't been implemented yet.public WatchKey register(WatchService watcher, WatchEvent.Kind<?>... events)
UnsupportedOperationException
because this feature hasn't been implemented yet.public File toFile()
UnsupportedOperationException
because Google Cloud Storage files are not backed
by the local file system.public int compareTo(Path other)
compareTo
in interface Comparable<Path>
compareTo
in interface Path
public boolean equals(Object other)
public int hashCode()
public String toString()
Copyright © 2019 Google LLC. All rights reserved.