com.nhncorp.neptune.fs
Class LocalFileSystem

java.lang.Object
  extended by com.nhncorp.neptune.fs.NeptuneFileSystem
      extended by com.nhncorp.neptune.fs.LocalFileSystem

public class LocalFileSystem
extends NeptuneFileSystem

Neptune - 로컬 파일시스템 구성을 지원하는 파일시스템 주로 테스트 용도로 활용

Author:
nhn

Field Summary
 
Fields inherited from class com.nhncorp.neptune.fs.NeptuneFileSystem
LOG
 
Constructor Summary
LocalFileSystem()
           
 
Method Summary
 void close()
           
 java.io.OutputStream create(GPath path)
           
 boolean delete(GPath path)
           
 boolean delete(GPath path, boolean recursive)
           
 boolean exists(GPath path)
           
 java.lang.String[][] getFileCacheHints(GPath path)
           
 long getLength(GPath path)
           
 boolean isDirectory(GPath path)
           
 GPath[] list(GPath path)
           
 boolean mkdirs(GPath path)
           
 boolean move(GPath targetPath, GPath destPath)
           
 java.io.InputStream open(GPath path)
           
 java.io.DataInputStream openDataInputStream(GPath path)
           
 boolean renameTo(GPath targetPath, GPath destPath)
           
 void seek(java.io.InputStream in, long offset)
           
 void setPermission(GPath path, short mode)
           
 
Methods inherited from class com.nhncorp.neptune.fs.NeptuneFileSystem
get, get
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalFileSystem

public LocalFileSystem()
                throws java.io.IOException
Throws:
java.io.IOException
Method Detail

exists

public boolean exists(GPath path)
Specified by:
exists in class NeptuneFileSystem

mkdirs

public boolean mkdirs(GPath path)
Specified by:
mkdirs in class NeptuneFileSystem

list

public GPath[] list(GPath path)
             throws java.io.IOException
Specified by:
list in class NeptuneFileSystem
Throws:
java.io.IOException

create

public java.io.OutputStream create(GPath path)
                            throws java.io.IOException
Specified by:
create in class NeptuneFileSystem
Throws:
java.io.IOException

open

public java.io.InputStream open(GPath path)
                         throws java.io.IOException
Specified by:
open in class NeptuneFileSystem
Throws:
java.io.IOException

seek

public void seek(java.io.InputStream in,
                 long offset)
          throws java.io.IOException
Specified by:
seek in class NeptuneFileSystem
Throws:
java.io.IOException

delete

public boolean delete(GPath path)
               throws java.io.IOException
Specified by:
delete in class NeptuneFileSystem
Throws:
java.io.IOException

move

public boolean move(GPath targetPath,
                    GPath destPath)
             throws java.io.IOException
Specified by:
move in class NeptuneFileSystem
Throws:
java.io.IOException

isDirectory

public boolean isDirectory(GPath path)
                    throws java.io.IOException
Specified by:
isDirectory in class NeptuneFileSystem
Throws:
java.io.IOException

getLength

public long getLength(GPath path)
               throws java.io.IOException
Specified by:
getLength in class NeptuneFileSystem
Throws:
java.io.IOException

openDataInputStream

public java.io.DataInputStream openDataInputStream(GPath path)
                                            throws java.io.IOException
Specified by:
openDataInputStream in class NeptuneFileSystem
Throws:
java.io.IOException

renameTo

public boolean renameTo(GPath targetPath,
                        GPath destPath)
                 throws java.io.IOException
Specified by:
renameTo in class NeptuneFileSystem
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in class NeptuneFileSystem
Throws:
java.io.IOException

getFileCacheHints

public java.lang.String[][] getFileCacheHints(GPath path)
                                       throws java.io.IOException
Throws:
java.io.IOException

setPermission

public void setPermission(GPath path,
                          short mode)
                   throws java.io.IOException
Specified by:
setPermission in class NeptuneFileSystem
Throws:
java.io.IOException

delete

public boolean delete(GPath path,
                      boolean recursive)
               throws java.io.IOException
Specified by:
delete in class NeptuneFileSystem
Throws:
java.io.IOException