Constructor and Description |
---|
FileFtplett(File rootDirectory) |
Modifier and Type | Method and Description |
---|---|
boolean |
changeWorkingDirectory(String directoryName) |
boolean |
delete(String resourceName) |
Date |
getModificationTime(String resourceName) |
String |
getWorkingDirectory() |
boolean |
list(String name,
de.unkrig.commons.lang.protocol.ConsumerWhichThrows<String,IOException> out) |
boolean |
nameList(String name,
de.unkrig.commons.lang.protocol.ConsumerWhichThrows<String,IOException> out) |
boolean |
rename(String from,
String to) |
InputStream |
retrieve(String fileName) |
OutputStream |
store(String fileName) |
public FileFtplett(File rootDirectory) throws IOException
IOException
public boolean changeWorkingDirectory(@Nullable String directoryName) throws IOException
changeWorkingDirectory
in interface Ftplett
directoryName
- null
means change to some 'root' or 'home' directoryIOException
public String getWorkingDirectory()
getWorkingDirectory
in interface Ftplett
@Nullable public InputStream retrieve(String fileName) throws IOException
retrieve
in interface Ftplett
InputStream
producing the contents of the resource, or null
iff the resource cannot
be accessed.IOException
public OutputStream store(String fileName) throws IOException
store
in interface Ftplett
OutputStream
to which the contents can be written, or null
iff the resource cannot
be accessed.IOException
public boolean list(@Nullable String name, de.unkrig.commons.lang.protocol.ConsumerWhichThrows<String,IOException> out) throws IOException
list
in interface Ftplett
name
- The name of the directory or file to list, or null
to list the current working
directoryout
- Consumes the listingIOException
public boolean nameList(@Nullable String name, de.unkrig.commons.lang.protocol.ConsumerWhichThrows<String,IOException> out) throws IOException
nameList
in interface Ftplett
name
- The name of the directory or file to list, or null
to list the current working
directoryout
- Consumes the listingIOException
public boolean delete(String resourceName) throws IOException
delete
in interface Ftplett
IOException
public boolean rename(String from, String to) throws IOException
rename
in interface Ftplett
IOException
@Nullable public Date getModificationTime(String resourceName) throws IOException
getModificationTime
in interface Ftplett
null
iff the modification time cannot be determinedIOException
Copyright © 2018 Arno Unkrig. All rights reserved.