Package com.github.mjdev.libaums.fs
Class FileSystemFactory
- java.lang.Object
-
- com.github.mjdev.libaums.fs.FileSystemFactory
-
public class FileSystemFactory extends java.lang.Object
This is a helper class to create different supported file systems. The file system is determined by {linkPartitionTableEntry
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FileSystemFactory.UnsupportedFileSystemException
-
Constructor Summary
Constructors Constructor Description FileSystemFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FileSystem
createFileSystem(PartitionTableEntry entry, BlockDeviceDriver blockDevice)
static java.util.TimeZone
getTimeZone()
static void
registerFileSystem(FileSystemCreator creator)
Register a new file system.static void
setTimeZone(java.util.TimeZone zone)
Set the timezone a file system should use to decode timestamps, if the file system only stores local date and time and has no reference which zone these timestamp correspond to.
-
-
-
Method Detail
-
createFileSystem
public static FileSystem createFileSystem(PartitionTableEntry entry, BlockDeviceDriver blockDevice) throws java.io.IOException, FileSystemFactory.UnsupportedFileSystemException
- Throws:
java.io.IOException
FileSystemFactory.UnsupportedFileSystemException
-
registerFileSystem
public static void registerFileSystem(FileSystemCreator creator)
Register a new file system.- Parameters:
creator
- The creator which is able to check if aBlockDeviceDriver
is holding the correct type of file system and is able to instantiate aFileSystem
instance.
-
setTimeZone
public static void setTimeZone(java.util.TimeZone zone)
Set the timezone a file system should use to decode timestamps, if the file system only stores local date and time and has no reference which zone these timestamp correspond to. (True for FAT32, e.g.)- Parameters:
zone
- The timezone to use.
-
getTimeZone
public static java.util.TimeZone getTimeZone()
-
-