edu.washington.cs.pl_if.scp
Class FileInfo

java.lang.Object
  extended by edu.washington.cs.pl_if.scp.FileInfo

public class FileInfo
extends Object


Constructor Summary
FileInfo(File file, String md5)
          Contructor used when getting md5 info of local files
FileInfo(String remotePath, String md5, String hostname)
          constructur used when downloading
 
Method Summary
 FileInfo clone()
          returns a clone of the current FileInfo
 boolean createLocalDirectoryStructure()
          create the directory structure needed to access this file
 int getCopyCount()
           
 String getFullRemotePath()
           
 String getLocalDirectory()
           
 File getLocalFile()
           
 String getMd5()
           
 String getRemoteDir()
           
 void increaseCopyCount()
           
 boolean isLocalFile()
           
 void setLocalFlatFile(File localBaseDir)
           
 void setLocalHierarchicalFile(File localBaseDir)
           
 void setRemotePath(File localBasePath, String remoteBasePath)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileInfo

public FileInfo(File file,
                String md5)
         throws IOException
Contructor used when getting md5 info of local files

Parameters:
file -
md5 -
Throws:
IOException

FileInfo

public FileInfo(String remotePath,
                String md5,
                String hostname)
constructur used when downloading

Parameters:
remotePath -
md5 -
hostname -
Method Detail

clone

public FileInfo clone()
returns a clone of the current FileInfo

Overrides:
clone in class Object

createLocalDirectoryStructure

public boolean createLocalDirectoryStructure()
create the directory structure needed to access this file

Returns:
true i successful

getCopyCount

public int getCopyCount()

getFullRemotePath

public String getFullRemotePath()

getLocalDirectory

public String getLocalDirectory()
                         throws IOException
Throws:
IOException

getLocalFile

public File getLocalFile()

getMd5

public String getMd5()

getRemoteDir

public String getRemoteDir()

increaseCopyCount

public void increaseCopyCount()

isLocalFile

public boolean isLocalFile()

setRemotePath

public void setRemotePath(File localBasePath,
                          String remoteBasePath)
                   throws IOException
Throws:
IOException

setLocalFlatFile

public void setLocalFlatFile(File localBaseDir)
                      throws IOException
Throws:
IOException

setLocalHierarchicalFile

public void setLocalHierarchicalFile(File localBaseDir)
                              throws IOException
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object