Package com.biglybt.core.util
Class FileHandler
java.lang.Object
com.biglybt.core.util.FileHandler
- Direct Known Subclasses:
FileUtil.FileHandlerHack
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsPathSegment
(File f, String path, boolean caseSensitive) getCanonicalFileSafe
(File file) Preserves the case of the file.name when the file exists but differs in casegetCanonicalPathSafe
(File file) Preserves the case of the file.name when the file exists but differs in casegetFileStore
(File file) getRelativePath
(File parentDir, File file) boolean
isAncestorOf
(File _parent, File _child) Whether child in an ancestor of parent, or child IS parentnewFileAccessor
(File file, String access_mode) newFileInputStream
(File from_file) newFileOutputStream
(File file, boolean append)
-
Constructor Details
-
FileHandler
public FileHandler()
-
-
Method Details
-
newFile
-
newFile
-
newFile
-
newFileOutputStream
- Throws:
FileNotFoundException
-
newFileInputStream
- Throws:
FileNotFoundException
-
newFileAccessor
public FMFileAccess.FileAccessor newFileAccessor(File file, String access_mode) throws FileNotFoundException - Throws:
FileNotFoundException
-
containsPathSegment
-
getRelativePath
- Returns:
- path string relative to
parentDir
.
null
if file is not in parentDir.
Empty String if file is parentDir.
-
getCanonicalFileSafe
Preserves the case of the file.name when the file exists but differs in case -
getCanonicalPathSafe
Preserves the case of the file.name when the file exists but differs in case -
isAncestorOf
Whether child in an ancestor of parent, or child IS parent -
getFileStore
-