| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead()
Verifica se é possível ler o arquivo.
|
boolean |
canWrite()
Verifica se é possível escrever no arquivo.
|
boolean |
exists()
Verifica se o arquivo existe no sistema de arquivos.
|
String |
getAbsolutePath()
Obtém o caminho completo para o arquivo, incluindo seu nome.
|
InputStream |
getInputStream()
Obtém um fluxo de entrada para leitura do arquivo.
|
long |
getLength()
Obtém o tamanho do arquivo.
|
String |
getName()
Obtém o nome do arquivo.
|
OutputStream |
getOutputStream(boolean append)
Obtém um fluxo de saída para escrita no arquivo.
|
boolean |
isDirectory()
Indica se é um diretório ou um arquivo regular.
|
public long getLength()
throws IOException
getLength in interface LocalFileIOException - Caso ocorra algum erro durante o procedimento.public boolean canRead()
throws IOException
canRead in interface LocalFileIOException - Caso ocorra algum erro durante o procedimento.public boolean canWrite()
throws IOException
canWrite in interface LocalFileIOException - Caso ocorra algum erro durante o procedimento.public InputStream getInputStream() throws IOException
getInputStream in interface LocalFileIOException - Caso ocorra algum erro durante o procedimento.public OutputStream getOutputStream(boolean append) throws IOException
getOutputStream in interface LocalFileappend - se true, os bytes serão acrescentados ao fim do
arquivo. se false, serão escritos no início (o arquivo
será sobrescrito).IOException - Caso ocorra algum erro durante o procedimento.public String getName() throws IOException
getName in interface LocalFileIOException - Caso ocorra algum erro durante o procedimento.public String getAbsolutePath() throws IOException
getAbsolutePath in interface LocalFileIOException - Caso ocorra algum erro durante o procedimento.public boolean exists()
public boolean isDirectory()
isDirectory in interface LocalFiletrue se for diretório ou false se for arquivo.Copyright © 2020. All rights reserved.