File
O objeto File é utilizado para interagir com ficheiros e pastas.
available
available() : int
Description
Returns the number of estimated bytes left to read a file
Return
( int )
baseName
baseName() : string
Return
( string )
bufferedReader
bufferedReader() : java.io.BufferedReader
Return
( java.io.BufferedReader )
bufferedReader(bufferSize: int) : java.io.BufferedReader
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
bufferSize | int |
Return
( java.io.BufferedReader )
bufferedReader(bufferSize: int, charset: string) : java.io.BufferedReader
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
bufferSize | int | |
charset | string |
Return
( java.io.BufferedReader )
bufferedReader(bufferSize: int, charset: java.nio.charset.Charset) : java.io.BufferedReader
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
bufferSize | int | |
charset | java.nio.charset.Charset |
Return
( java.io.BufferedReader )
bufferedReader(charset: string) : java.io.BufferedReader
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
charset | string |
Return
( java.io.BufferedReader )
bufferedReader(charset: java.nio.charset.Charset) : java.io.BufferedReader
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
charset | java.nio.charset.Charset |
Return
( java.io.BufferedReader )
bytes
bytes() : byte[]
Description
Returns the number of estimated bytes left to read a file
Return
( byte[] )
contentType
contentType() : string
Return
( string )
contentType(contentType: string) : File
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
contentType | string |
Return
( File )
copy
copy(destPath: string) : boolean
Description
Copies the file to the inserted path
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
destPath | string | Path where to copy the file/directory. |
Return
( boolean )
copy(destPath: string, override: boolean) : boolean
Description
Copies the file of the inserted path with override option if exists a file
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
destPath | string | Path where to copy the file/directory. |
override | boolean | Override if exists a file already. |
Return
( boolean )
copyFiles
copyFiles(destPath: string, extension: string) : boolean
Description
Copies the files by the inserted extension to the inserted path.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
destPath | string | Path where to copy the file/directory. |
extension | string | File extension. |
Return
( boolean )
delete
delete() : boolean
Description
Deletes the file of the inserted file
Return
( boolean )
deleteAll
deleteAll() : boolean
Description
Deletes a file/directory and recursive all the subs
Return
( boolean )
deleteAll(extension: string) : boolean
Description
Deletes a file/directory by the file extension
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
extension | string |
Return
( boolean )
deleteFiles
deleteFiles() : boolean
Description
Deletes a file/directory and recursive all the subs
Return
( boolean )
deleteFiles(stringExtension: string) : boolean
Description
Deletes a file of a inserted extension and recursive all the subs
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
stringExtension | string | String extension of the file. |
Return
( boolean )
ensureJail
ensureJail(jailPath: string) : File
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
jailPath | string |
Return
( File )
exists
exists() : boolean
Description
Returns a boolean result that verify if the inserted path exists
Return
( boolean )
extension
extension() : string
Return
( string )
fullPath
fullPath() : string
Description
Allows to get the complete path of the file.
Return
( string )
getBaseName
getBaseName() : string
Description
Returns the base name of the present file
Return
( string )
getBytes
getBytes() : byte[]
Description
Returns the number of estimated bytes left to read a file
Return
( byte[] )
getContentType
getContentType() : string
Return
( string )
getExtension
getExtension() : string
Return
( string )
getFullPath
getFullPath() : string
Description
Returns the full path until the present file
Return
( string )
getInput
getInput() : InputStream
Return
( InputStream )
getInputStream
getInputStream() : InputStream
Description
Returns the number of estimated bytes
Return
( InputStream )
getName
getName() : string
Description
Returns the name of a file
Return
( string )
getName(path: string) : string
Description
Returns the name of a file in the inserted path
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
path | string | Path to the file/directory. |
Return
( string )
getOutput
getOutput() : OutputStream
Return
( OutputStream )
getOutputStream
getOutputStream() : OutputStream
Return
( OutputStream )
getPath
getPath() : string
Description
Returns the path
Return
( string )
getPhysicalPath
getPhysicalPath() : string
Return
( string )
getSequenceName
getSequenceName(targetPath: java.io.File, fileName: string) : string
Description
Returns the name of the inserted file with a sequence number if the file already exists with the original name
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
targetPath | java.io.File | Path to the file/directory. |
fileName | string | Name of the file. |
Return
( string )
getSequenceName(targetPath: string, fileName: string) : string
Description
Returns the name of the inserted file with a sequence number if the file already exists with the original name
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
targetPath | string | Path to the file/directory. |
fileName | string | Name of the file. |
Return
( string )
input
input() : InputStream
Return
( InputStream )
inputStream
inputStream() : InputStream
Return
( InputStream )
isBaseName
isBaseName(baseName: string) : boolean
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
baseName | string |
Return
( boolean )
isDirectory
isDirectory() : boolean
Description
Returns a boolean result that verify if the inserted path is a directory
Return
( boolean )
isExtension
isExtension(extension: string) : boolean
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
extension | string |
Return
( boolean )
isFile
isFile() : boolean
Description
Returns a boolean result that verify if the inserted path is a file
Return
( boolean )
isJail
isJail() : boolean
Description
Does a authentication if the file has his location limited to another folder
Return
( boolean )
lastModified
lastModified() : long
Description
Returns the hour that the file of the inserted path was last modified
Return
( long )
list
list() : java.util.List
Description
Returns a list of all the files and directories on the inserted path
Return
( java.util.List )
mkdir
mkdir() : boolean
Description
Creates a directory in the present path.
Return
( boolean )
mkdirs
mkdirs() : boolean
Return
( boolean )
name
name() : string
Description
Returns the name of a file
Return
( string )
output
output() : OutputStream
Return
( OutputStream )
outputStream
outputStream() : OutputStream
Return
( OutputStream )
path
path() : string
Description
Returns the path of the file/directory
Return
( string )
Returns a boolean verification of the existence of the file and tracks it folder location.
physicalPath
physicalPath() : string
Description
Allows to get the path of the file.
Return
( string )
reader
reader() : java.io.Reader
Return
( java.io.Reader )
readerBOM
readerBOM() : java.io.Reader
Return
( java.io.Reader )
readerBOM(charsetName: string) : java.io.Reader
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
charsetName | string |
Return
( java.io.Reader )
rename
rename(newName: string) : boolean
Description
Renames a file with the new name inserted
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
newName | string | New name to rename the file. |
Return
( boolean )
renameTo
renameTo(destPath: string) : boolean
Description
Renames the file of the inserted file
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
destPath | string | Path to the file/directory. |
Return
( boolean )
save
save(path: java.lang.Object) : void
Description
Saves the file in the inserted path
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
path | java.lang.Object | Path of the file. |
Return
( void )
save(path: string) : void
Description
Saves the file in the inserted path
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
path | string | Path where to save the file. |
Return
( void )
sequenceName
sequenceName(targetPath: java.io.File, fileName: string) : string
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
targetPath | java.io.File | |
fileName | string |
Return
( string )
sequenceName(targetPath: string, fileName: string) : string
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
targetPath | string | |
fileName | string |
Return
( string )
setContentType
setContentType(contentType: string) : File
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
contentType | string |
Return
( File )
writer
writer() : java.io.Writer
Return
( java.io.Writer )