Package org.apache.groovy.nio.runtime
Class WritablePath
java.lang.Object
org.apache.groovy.nio.runtime.WritablePath
- All Implemented Interfaces:
groovy.lang.Writable,java.lang.Comparable<java.nio.file.Path>,java.lang.Iterable<java.nio.file.Path>,java.nio.file.Path,java.nio.file.Watchable
public class WritablePath
extends java.lang.Object
implements java.nio.file.Path, groovy.lang.Writable
A Writable Path.
-
Constructor Summary
Constructors Constructor Description WritablePath(java.nio.file.Path delegate)WritablePath(java.nio.file.Path delegate, java.lang.String encoding) -
Method Summary
Modifier and Type Method Description intcompareTo(java.nio.file.Path other)booleanendsWith(java.lang.String other)booleanendsWith(java.nio.file.Path other)booleanequals(java.lang.Object other)java.nio.file.PathgetFileName()java.nio.file.FileSystemgetFileSystem()java.nio.file.PathgetName(int index)intgetNameCount()java.nio.file.PathgetParent()java.nio.file.PathgetRoot()inthashCode()booleanisAbsolute()java.util.Iterator<java.nio.file.Path>iterator()java.nio.file.Pathnormalize()java.nio.file.WatchKeyregister(java.nio.file.WatchService watcher, java.nio.file.WatchEvent.Kind<?>... events)java.nio.file.WatchKeyregister(java.nio.file.WatchService watcher, java.nio.file.WatchEvent.Kind<?>[] events, java.nio.file.WatchEvent.Modifier... modifiers)java.nio.file.Pathrelativize(java.nio.file.Path other)java.nio.file.Pathresolve(java.lang.String other)java.nio.file.Pathresolve(java.nio.file.Path other)java.nio.file.PathresolveSibling(java.lang.String other)java.nio.file.PathresolveSibling(java.nio.file.Path other)booleanstartsWith(java.lang.String other)booleanstartsWith(java.nio.file.Path other)java.nio.file.Pathsubpath(int beginIndex, int endIndex)java.nio.file.PathtoAbsolutePath()java.io.FiletoFile()java.nio.file.PathtoRealPath(java.nio.file.LinkOption... options)java.lang.StringtoString()java.net.URItoUri()java.io.WriterwriteTo(java.io.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
public WritablePath(java.nio.file.Path delegate) -
WritablePath
public WritablePath(java.nio.file.Path delegate, java.lang.String encoding)
-
-
Method Details
-
writeTo
public java.io.Writer writeTo(java.io.Writer out) throws java.io.IOException- Specified by:
writeToin interfacegroovy.lang.Writable- Throws:
java.io.IOException
-
getFileSystem
public java.nio.file.FileSystem getFileSystem()- Specified by:
getFileSystemin interfacejava.nio.file.Path
-
isAbsolute
public boolean isAbsolute()- Specified by:
isAbsolutein interfacejava.nio.file.Path
-
getRoot
public java.nio.file.Path getRoot()- Specified by:
getRootin interfacejava.nio.file.Path
-
getFileName
public java.nio.file.Path getFileName()- Specified by:
getFileNamein interfacejava.nio.file.Path
-
getParent
public java.nio.file.Path getParent()- Specified by:
getParentin interfacejava.nio.file.Path
-
getNameCount
public int getNameCount()- Specified by:
getNameCountin interfacejava.nio.file.Path
-
getName
public java.nio.file.Path getName(int index)- Specified by:
getNamein interfacejava.nio.file.Path
-
subpath
public java.nio.file.Path subpath(int beginIndex, int endIndex)- Specified by:
subpathin interfacejava.nio.file.Path
-
startsWith
public boolean startsWith(java.nio.file.Path other)- Specified by:
startsWithin interfacejava.nio.file.Path
-
startsWith
public boolean startsWith(java.lang.String other)- Specified by:
startsWithin interfacejava.nio.file.Path
-
endsWith
public boolean endsWith(java.nio.file.Path other)- Specified by:
endsWithin interfacejava.nio.file.Path
-
endsWith
public boolean endsWith(java.lang.String other)- Specified by:
endsWithin interfacejava.nio.file.Path
-
normalize
public java.nio.file.Path normalize()- Specified by:
normalizein interfacejava.nio.file.Path
-
resolve
public java.nio.file.Path resolve(java.nio.file.Path other)- Specified by:
resolvein interfacejava.nio.file.Path
-
resolve
public java.nio.file.Path resolve(java.lang.String other)- Specified by:
resolvein interfacejava.nio.file.Path
-
resolveSibling
public java.nio.file.Path resolveSibling(java.nio.file.Path other)- Specified by:
resolveSiblingin interfacejava.nio.file.Path
-
resolveSibling
public java.nio.file.Path resolveSibling(java.lang.String other)- Specified by:
resolveSiblingin interfacejava.nio.file.Path
-
relativize
public java.nio.file.Path relativize(java.nio.file.Path other)- Specified by:
relativizein interfacejava.nio.file.Path
-
toUri
public java.net.URI toUri()- Specified by:
toUriin interfacejava.nio.file.Path
-
toAbsolutePath
public java.nio.file.Path toAbsolutePath()- Specified by:
toAbsolutePathin interfacejava.nio.file.Path
-
toRealPath
public java.nio.file.Path toRealPath(java.nio.file.LinkOption... options) throws java.io.IOException- Specified by:
toRealPathin interfacejava.nio.file.Path- Throws:
java.io.IOException
-
toFile
public java.io.File toFile()- Specified by:
toFilein interfacejava.nio.file.Path
-
register
public java.nio.file.WatchKey register(java.nio.file.WatchService watcher, java.nio.file.WatchEvent.Kind<?>[] events, java.nio.file.WatchEvent.Modifier... modifiers) throws java.io.IOException- Specified by:
registerin interfacejava.nio.file.Path- Specified by:
registerin interfacejava.nio.file.Watchable- Throws:
java.io.IOException
-
register
public java.nio.file.WatchKey register(java.nio.file.WatchService watcher, java.nio.file.WatchEvent.Kind<?>... events) throws java.io.IOException- Specified by:
registerin interfacejava.nio.file.Path- Specified by:
registerin interfacejava.nio.file.Watchable- Throws:
java.io.IOException
-
iterator
public java.util.Iterator<java.nio.file.Path> iterator()- Specified by:
iteratorin interfacejava.lang.Iterable<java.nio.file.Path>- Specified by:
iteratorin interfacejava.nio.file.Path
-
compareTo
public int compareTo(java.nio.file.Path other)- Specified by:
compareToin interfacejava.lang.Comparable<java.nio.file.Path>- Specified by:
compareToin interfacejava.nio.file.Path
-
equals
public boolean equals(java.lang.Object other)- Specified by:
equalsin interfacejava.nio.file.Path- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacejava.nio.file.Path- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Specified by:
toStringin interfacejava.nio.file.Path- Overrides:
toStringin classjava.lang.Object
-