org.neo4j.kernel
Class DefaultFileSystemAbstraction

java.lang.Object
  extended by org.neo4j.kernel.DefaultFileSystemAbstraction
All Implemented Interfaces:
org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction

public class DefaultFileSystemAbstraction
extends Object
implements org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction

Default file system abstraction that creates files using the underlying file system.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction
org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction.ThirdPartyFileSystem
 
Constructor Summary
DefaultFileSystemAbstraction()
           
 
Method Summary
 void copyFile(File from, File to)
           
 void copyRecursively(File fromDirectory, File toDirectory)
           
 FileChannel create(File fileName)
           
 boolean deleteFile(File fileName)
           
 void deleteRecursively(File directory)
           
 boolean fileExists(File fileName)
           
 long getFileSize(File fileName)
           
<K extends org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction.ThirdPartyFileSystem>
K
getOrCreateThirdPartyFileSystem(Class<K> clazz, Function<Class<K>,K> creator)
           
 boolean isDirectory(File file)
           
 File[] listFiles(File directory)
           
 boolean mkdir(File fileName)
           
 void mkdirs(File path)
           
 void moveToDirectory(File file, File toDirectory)
           
 FileChannel open(File fileName, String mode)
           
 InputStream openAsInputStream(File fileName)
           
 OutputStream openAsOutputStream(File fileName, boolean append)
           
 Reader openAsReader(File fileName, String encoding)
           
 Writer openAsWriter(File fileName, String encoding, boolean append)
           
 boolean renameFile(File from, File to)
           
 org.neo4j.kernel.impl.nioneo.store.FileLock tryLock(File fileName, FileChannel channel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFileSystemAbstraction

public DefaultFileSystemAbstraction()
Method Detail

open

public FileChannel open(File fileName,
                        String mode)
                 throws IOException
Specified by:
open in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction
Throws:
IOException

openAsOutputStream

public OutputStream openAsOutputStream(File fileName,
                                       boolean append)
                                throws IOException
Specified by:
openAsOutputStream in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction
Throws:
IOException

openAsInputStream

public InputStream openAsInputStream(File fileName)
                              throws IOException
Specified by:
openAsInputStream in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction
Throws:
IOException

openAsReader

public Reader openAsReader(File fileName,
                           String encoding)
                    throws IOException
Specified by:
openAsReader in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction
Throws:
IOException

openAsWriter

public Writer openAsWriter(File fileName,
                           String encoding,
                           boolean append)
                    throws IOException
Specified by:
openAsWriter in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction
Throws:
IOException

tryLock

public org.neo4j.kernel.impl.nioneo.store.FileLock tryLock(File fileName,
                                                           FileChannel channel)
                                                    throws IOException
Specified by:
tryLock in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction
Throws:
IOException

create

public FileChannel create(File fileName)
                   throws IOException
Specified by:
create in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction
Throws:
IOException

mkdir

public boolean mkdir(File fileName)
Specified by:
mkdir in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction

mkdirs

public void mkdirs(File path)
            throws IOException
Specified by:
mkdirs in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction
Throws:
IOException

fileExists

public boolean fileExists(File fileName)
Specified by:
fileExists in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction

getFileSize

public long getFileSize(File fileName)
Specified by:
getFileSize in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction

deleteFile

public boolean deleteFile(File fileName)
Specified by:
deleteFile in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction

deleteRecursively

public void deleteRecursively(File directory)
                       throws IOException
Specified by:
deleteRecursively in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction
Throws:
IOException

renameFile

public boolean renameFile(File from,
                          File to)
                   throws IOException
Specified by:
renameFile in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction
Throws:
IOException

listFiles

public File[] listFiles(File directory)
Specified by:
listFiles in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction

isDirectory

public boolean isDirectory(File file)
Specified by:
isDirectory in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction

moveToDirectory

public void moveToDirectory(File file,
                            File toDirectory)
                     throws IOException
Specified by:
moveToDirectory in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction
Throws:
IOException

copyFile

public void copyFile(File from,
                     File to)
              throws IOException
Specified by:
copyFile in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction
Throws:
IOException

copyRecursively

public void copyRecursively(File fromDirectory,
                            File toDirectory)
                     throws IOException
Specified by:
copyRecursively in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction
Throws:
IOException

getOrCreateThirdPartyFileSystem

public <K extends org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction.ThirdPartyFileSystem> K getOrCreateThirdPartyFileSystem(Class<K> clazz,
                                                                                                                                   Function<Class<K>,K> creator)
Specified by:
getOrCreateThirdPartyFileSystem in interface org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction


Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.