Package com.logicaldoc.ftp
Class LogicalFtpFile
- java.lang.Object
-
- com.logicaldoc.ftp.LogicalFtpFile
-
- All Implemented Interfaces:
org.apache.ftpserver.ftplet.FtpFile
public class LogicalFtpFile extends Object implements org.apache.ftpserver.ftplet.FtpFile
Our own implementation of a FTP File- Since:
- 8.0
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description LogicalFtpFile(com.logicaldoc.core.document.Document document, FtpUser user)
LogicalFtpFile(com.logicaldoc.core.folder.Folder folder, FtpUser user)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
createInputStream(long offset)
OutputStream
createOutputStream(long offset)
boolean
delete()
boolean
doesExist()
String
getAbsolutePath()
com.logicaldoc.core.document.Document
getDocument()
com.logicaldoc.core.folder.Folder
getFolder()
String
getGroupName()
long
getLastModified()
int
getLinkCount()
String
getName()
String
getOwnerName()
String
getPath()
Object
getPhysicalFile()
long
getSize()
FtpUser
getUser()
boolean
isDirectory()
boolean
isFile()
boolean
isHidden()
boolean
isReadable()
boolean
isRemovable()
boolean
isWritable()
List<? extends org.apache.ftpserver.ftplet.FtpFile>
listFiles()
boolean
mkdir()
boolean
move(org.apache.ftpserver.ftplet.FtpFile toFile)
boolean
setLastModified(long lastModified)
void
setPath(String path)
String
toString()
-
-
-
Method Detail
-
getPath
public String getPath()
-
setPath
public void setPath(String path)
-
getFolder
public com.logicaldoc.core.folder.Folder getFolder()
-
getDocument
public com.logicaldoc.core.document.Document getDocument()
-
createInputStream
public InputStream createInputStream(long offset) throws IOException
- Specified by:
createInputStream
in interfaceorg.apache.ftpserver.ftplet.FtpFile
- Throws:
IOException
-
createOutputStream
public OutputStream createOutputStream(long offset) throws IOException
- Specified by:
createOutputStream
in interfaceorg.apache.ftpserver.ftplet.FtpFile
- Throws:
IOException
-
delete
public boolean delete()
- Specified by:
delete
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
doesExist
public boolean doesExist()
- Specified by:
doesExist
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
getAbsolutePath
public String getAbsolutePath()
- Specified by:
getAbsolutePath
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
getGroupName
public String getGroupName()
- Specified by:
getGroupName
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
getLastModified
public long getLastModified()
- Specified by:
getLastModified
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
getLinkCount
public int getLinkCount()
- Specified by:
getLinkCount
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
getOwnerName
public String getOwnerName()
- Specified by:
getOwnerName
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
getPhysicalFile
public Object getPhysicalFile()
- Specified by:
getPhysicalFile
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
getSize
public long getSize()
- Specified by:
getSize
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
isDirectory
public boolean isDirectory()
- Specified by:
isDirectory
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
isFile
public boolean isFile()
- Specified by:
isFile
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
isHidden
public boolean isHidden()
- Specified by:
isHidden
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
isReadable
public boolean isReadable()
- Specified by:
isReadable
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
isRemovable
public boolean isRemovable()
- Specified by:
isRemovable
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
isWritable
public boolean isWritable()
- Specified by:
isWritable
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
listFiles
public List<? extends org.apache.ftpserver.ftplet.FtpFile> listFiles()
- Specified by:
listFiles
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
mkdir
public boolean mkdir()
- Specified by:
mkdir
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
move
public boolean move(org.apache.ftpserver.ftplet.FtpFile toFile)
- Specified by:
move
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
setLastModified
public boolean setLastModified(long lastModified)
- Specified by:
setLastModified
in interfaceorg.apache.ftpserver.ftplet.FtpFile
-
getUser
public FtpUser getUser()
-
-