Package tv.hd3g.transfertfiles
Class CommonAbstractFile<T extends AbstractFileSystem<?>>
- java.lang.Object
-
- tv.hd3g.transfertfiles.CommonAbstractFile<T>
-
- All Implemented Interfaces:
AbstractFile
public abstract class CommonAbstractFile<T extends AbstractFileSystem<?>> extends Object implements AbstractFile
-
-
Field Summary
Fields Modifier and Type Field Description protected TfileSystemprotected StringpathRelative path only
-
Constructor Summary
Constructors Modifier Constructor Description protectedCommonAbstractFile(T fileSystem, String... path)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)AbstractFileSystem<?>getFileSystem()StringgetName()AbstractFilegetParent()StringgetPath()Relative path onlyinthashCode()booleanisHidden()static longobservableCopyStream(InputStream inputStream, OutputStream outputStream, int bufferSize, SizedStoppableCopyCallback copyCallback)Dont forget to close inputStream / outputStream after useStringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface tv.hd3g.transfertfiles.AbstractFile
copyAbstractToAbstract, copyAbstractToAbstract, copyAbstractToLocal, delete, downloadAbstract, exists, isDirectory, isFile, isLink, isSpecial, lastModified, length, list, mkdir, renameTo, renameTo, sendLocalToAbstract, toCache, toCachedList, uploadAbstract
-
-
-
-
Field Detail
-
fileSystem
protected final T extends AbstractFileSystem<?> fileSystem
-
path
protected final String path
Relative path only
-
-
Method Detail
-
getFileSystem
public AbstractFileSystem<?> getFileSystem()
- Specified by:
getFileSystemin interfaceAbstractFile
-
getPath
public String getPath()
Description copied from interface:AbstractFileRelative path only- Specified by:
getPathin interfaceAbstractFile- Returns:
- always with '/' as directory separators
-
getName
public String getName()
- Specified by:
getNamein interfaceAbstractFile
-
getParent
public AbstractFile getParent()
- Specified by:
getParentin interfaceAbstractFile- Returns:
- null if not parent (this is root dir)
-
isHidden
public boolean isHidden()
- Specified by:
isHiddenin interfaceAbstractFile- Returns:
- marked "hidden" or is a dotfile
-
observableCopyStream
public static long observableCopyStream(InputStream inputStream, OutputStream outputStream, int bufferSize, SizedStoppableCopyCallback copyCallback) throws IOException
Dont forget to close inputStream / outputStream after use- Throws:
IOException
-
-