001 package jmaster.jumploader.model.api.file;
002
003 import jmaster.jumploader.model.api.common.IAttributeSet;
004
005 /**
006 * IFile
007 *
008 * @author timur
009 */
010
011 public interface IFile {
012 //---------------------------------------------------------------
013 // constants
014 //---------------------------------------------------------------
015 //---------------------------------------------------------------
016 // business methods
017 //---------------------------------------------------------------
018 /**
019 * file id retrieval (convinience method)
020 */
021 public String getId();
022 /**
023 * id assignment
024 */
025 public void setId( String id );
026 /**
027 * file handle retrieval
028 */
029 public java.io.File getFile();
030 /**
031 * local file path retrieval
032 */
033 public String getPath();
034 /**
035 * local file name retrieval
036 */
037 public String getName();
038 /**
039 * file length retrieval (bytes)
040 */
041 public long getLength();
042 /**
043 * shows whether file is directory
044 */
045 public boolean isDirectory();
046 /**
047 * shows whether file is normal file
048 */
049 public boolean isFile();
050 /**
051 * shows whether file belongs to filesystem or not
052 */
053 public boolean isFileSystem();
054 /**
055 * shows whether file is drive
056 */
057 public boolean isDrive();
058 /**
059 * attribute set retrieval
060 */
061 public IAttributeSet getAttributeSet();
062 /**
063 * oroginal file path retrieval,
064 * used when original file replaced with transformed (i.e. zipped)
065 */
066 public String getOriginalFilePath();
067 /**
068 * compression ratio (transformed file length / original file length)
069 */
070 public Double getCompressionRatio();
071 }