p2pMapReduce.fs
Class FileSystemView

java.lang.Object
  extended by p2pMapReduce.fs.FileSystemView

public class FileSystemView
extends java.lang.Object

Gives a file system view pointed to a specified root directory


Constructor Summary
FileSystemView(java.lang.String rootDir)
           
 
Method Summary
 java.io.File createFile(java.lang.String path)
           
 java.lang.String createPath(java.lang.String path)
           
 java.lang.String createTempDir()
          Creates a random named directory in the ftp home dir.
 boolean delete(java.lang.String filePath)
           
 java.lang.String getRootDir()
           
 boolean mkdir(java.lang.String path)
           
 boolean mkdirs(java.lang.String path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemView

public FileSystemView(java.lang.String rootDir)
               throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

getRootDir

public java.lang.String getRootDir()

createPath

public java.lang.String createPath(java.lang.String path)

createFile

public java.io.File createFile(java.lang.String path)

mkdir

public boolean mkdir(java.lang.String path)

mkdirs

public boolean mkdirs(java.lang.String path)

delete

public boolean delete(java.lang.String filePath)

createTempDir

public java.lang.String createTempDir()
Creates a random named directory in the ftp home dir. Returns the path of the created directory relative to the ftp home dir

Returns:
a random directory name