Package org.apache.groovy.nio.runtime
Class WritablePath
java.lang.Object
org.apache.groovy.nio.runtime.WritablePath
public class WritablePath extends Object implements Path, groovy.lang.Writable
A Writable Path.
-
Constructor Summary
Constructors Constructor Description WritablePath(Path delegate)WritablePath(Path delegate, String encoding) -
Method Summary
Modifier and Type Method Description intcompareTo(Path other)booleanendsWith(String other)booleanendsWith(Path other)booleanequals(Object other)PathgetFileName()FileSystemgetFileSystem()PathgetName(int index)intgetNameCount()PathgetParent()PathgetRoot()inthashCode()booleanisAbsolute()Iterator<Path>iterator()Pathnormalize()WatchKeyregister(WatchService watcher, WatchEvent.Kind<?>... events)WatchKeyregister(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers)Pathrelativize(Path other)Pathresolve(String other)Pathresolve(Path other)PathresolveSibling(String other)PathresolveSibling(Path other)booleanstartsWith(String other)booleanstartsWith(Path other)Pathsubpath(int beginIndex, int endIndex)PathtoAbsolutePath()FiletoFile()PathtoRealPath(LinkOption... options)StringtoString()URItoUri()WriterwriteTo(Writer out)Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
WritablePath
-
WritablePath
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfacegroovy.lang.Writable- Throws:
IOException
-
getFileSystem
- Specified by:
getFileSystemin interfacePath
-
isAbsolute
public boolean isAbsolute()- Specified by:
isAbsolutein interfacePath
-
getRoot
-
getFileName
- Specified by:
getFileNamein interfacePath
-
getParent
-
getNameCount
public int getNameCount()- Specified by:
getNameCountin interfacePath
-
getName
-
subpath
-
startsWith
- Specified by:
startsWithin interfacePath
-
startsWith
- Specified by:
startsWithin interfacePath
-
endsWith
-
endsWith
-
normalize
-
resolve
-
resolve
-
resolveSibling
- Specified by:
resolveSiblingin interfacePath
-
resolveSibling
- Specified by:
resolveSiblingin interfacePath
-
relativize
- Specified by:
relativizein interfacePath
-
toUri
-
toAbsolutePath
- Specified by:
toAbsolutePathin interfacePath
-
toRealPath
- Specified by:
toRealPathin interfacePath- Throws:
IOException
-
toFile
-
register
public WatchKey register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) throws IOException- Specified by:
registerin interfacePath- Specified by:
registerin interfaceWatchable- Throws:
IOException
-
register
- Specified by:
registerin interfacePath- Specified by:
registerin interfaceWatchable- Throws:
IOException
-
iterator
-
compareTo
- Specified by:
compareToin interfaceComparable<Path>- Specified by:
compareToin interfacePath
-
equals
-
hashCode
public int hashCode() -
toString
-