Package com.aoapps.io.filesystems.posix
Class DedupPosixFileSystem
java.lang.Object
com.aoapps.io.filesystems.FileSystemWrapper
com.aoapps.io.filesystems.posix.DedupPosixFileSystem
- All Implemented Interfaces:
FileSystem
,PosixFileSystem
De-duplicates data chunks on the fly.
real name (empty file, small file, or possible full/partially restored large file) <A<O<DEDUP>O>A>_# → symbolic linked to real name <A<O<DEDUP>O>A>_#_chunk#_md5_size[.gz] → hard linked to index
Renaming a file requires to rename both the file and the one symbolic link to the file.
Files smaller than TODO bytes in length will not be deduped. This is because the overhead of deduping is:
- TODO
- Author:
- AO Industries, Inc.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.aoapps.io.filesystems.FileSystemWrapper
FileSystemWrapper.PathIteratorWrapper, FileSystemWrapper.PathWrapper
-
Field Summary
Fields inherited from class com.aoapps.io.filesystems.FileSystemWrapper
wrappedFileSystem
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateDirectory
(Path path, int mode) Delegates to the wrapped file system.createFile
(Path path) createFile
(Path path, int mode) Atomically creates an empty file (must not have already existed) with the given permissions.Delegates to the wrapped file system.Methods inherited from class com.aoapps.io.filesystems.FileSystemWrapper
checkSubPath, createDirectory, delete, join, list, lock, parsePath, size, unwrapPath, wrapPath, wrapSubPath
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aoapps.io.filesystems.FileSystem
createDirectory, delete, join, list, lock, parsePath, size
Methods inherited from interface com.aoapps.io.filesystems.posix.PosixFileSystem
checkSubPath
-
Constructor Details
-
DedupPosixFileSystem
-
-
Method Details
-
stat
Delegates to the wrapped file system.- Specified by:
stat
in interfacePosixFileSystem
- Parameters:
path
- Must be from this file system.- Throws:
IOException
-
createFile
- Specified by:
createFile
in interfaceFileSystem
- Overrides:
createFile
in classFileSystemWrapper
- Throws:
IOException
-
createFile
Description copied from interface:PosixFileSystem
Atomically creates an empty file (must not have already existed) with the given permissions.- Specified by:
createFile
in interfacePosixFileSystem
- Returns:
- returns the path
- Throws:
IOException
- if an underlying I/O error occurs.
-
createDirectory
Delegates to the wrapped file system.- Specified by:
createDirectory
in interfacePosixFileSystem
- Returns:
- returns the path
- Throws:
IOException
- if an underlying I/O error occurs.
-