public class File extends File
Modifier and Type | Field and Description |
---|---|
String |
extensionSeparator
The character which splits the file name extension from the file name.
|
char |
extensionSeparatorChar
The character which splits the file name extension from the file name.
|
pathSeparator, pathSeparatorChar, separator, separatorChar
Constructor and Description |
---|
File(File parent,
String child)
Same as java.io.File.
|
File(String pathname)
Same as java.io.File.
|
File(String parent,
String child)
Same as java.io.File.
|
File(URI uri)
Same as java.io.File.
|
Modifier and Type | Method and Description |
---|---|
File |
changeExtension(String newExtension)
Changes the file name extension and returns the result.
|
File |
getFileWithoutExtension()
Returns the file name without file name extension and without extension separator i.e.
|
String |
getNameExtension()
Returns the file name extension from file name without extension separator i.e.
|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, 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 final char extensionSeparatorChar
public final String extensionSeparator
public File(File parent, String child)
public File(String pathname)
public File(String parent, String child)
public File(URI uri)
public File changeExtension(String newExtension)
newExtension
- the file name extension of returned file object i.e. "xls" in the example abovepublic File getFileWithoutExtension()
public String getNameExtension()
Copyright © 2013. All Rights Reserved.