public class DotGroovyFile extends File
pathSeparator, pathSeparatorChar, separator, separatorChar
Constructor and Description |
---|
DotGroovyFile(File file)
A convenience constructor to turn a regular file into a DotGroovyFile.
|
DotGroovyFile(File parent,
String child)
Constructs a new DotGroovyFile object with the specified parameters.
|
DotGroovyFile(String pathname)
Constructs a new DotGroovyFile object with the specified parameters.
|
DotGroovyFile(String parent,
String child)
Constructs a new DotGroovyFile object with the specified parameters.
|
DotGroovyFile(URI uri)
Constructs a new DotGroovyFile object with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
static Set<String> |
defaultScriptExtensions()
Default Groovy file extensions (currently '.groovy', '.gvy', '.gy', and '.gsh').
|
String |
getName()
A method to lie about the file extension and say it is ".groovy".
|
Set<String> |
getScriptExtensions()
Gets the script extensions for this Groovy file.
|
DotGroovyFile |
setScriptExtensions(Set<String> newScriptExtensions)
Sets the script extensions for this Groovy file.
|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURL
public DotGroovyFile(String pathname)
pathname
- Pathname to use to create DotGroovyFilepublic DotGroovyFile(String parent, String child)
parent
- Parent pathname to use to create DotGroovyFilechild
- Child pathname to use to create DotGroovyFilepublic DotGroovyFile(File parent, String child)
parent
- Parent file to use to create DotGroovyFilechild
- Child pathname to use to create DotGroovyFilepublic DotGroovyFile(URI uri)
uri
- URI to use to create DotGroovyFilepublic DotGroovyFile(File file)
file
- File to use to create DotGroovyFilepublic static Set<String> defaultScriptExtensions()
public String getName()
public Set<String> getScriptExtensions()
public DotGroovyFile setScriptExtensions(Set<String> newScriptExtensions)
newScriptExtensions
- The script extensions to set on this Groovy fileCopyright © 2011–2019. All rights reserved.