de.waldheinz.fs
Class FileSystemFactory

java.lang.Object
  extended by de.waldheinz.fs.FileSystemFactory

public class FileSystemFactory
extends Object

Factory for FileSystem instances.

Author:
Matthias Treydte <waldheinz at gmail.com>

Method Summary
static FileSystem create(BlockDevice device, boolean readOnly)
           Creates a new FileSystem for the specified device.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static FileSystem create(BlockDevice device,
                                boolean readOnly)
                         throws IOException

Creates a new FileSystem for the specified device. When using this method, care must be taken that there is only one FileSystems accessing the specified BlockDevice. Otherwise severe file system corruption may occur.

Parameters:
device - the device to create the file system for
readOnly - if the file system should be openend read-only
Returns:
a new FileSystem instance for the specified device
Throws:
IOException - on read error, or if the file system type could not be determined


Copyright © 2014. All rights reserved.