Package com.killcoding.file
Class BaseFile
java.lang.Object
com.killcoding.file.BaseFile
- Direct Known Subclasses:
DiskFile,RemoteFile
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic longstatic Stringprivate static longstatic longstatic longstatic longprotected Fileprotected static booleanprotected Filestatic Pathprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidafterCreateLink(String target) abstract voidafterDelete(boolean realDeleted) abstract voidabstract voidabstract booleanbeforeCreateLink(String target) abstract booleanbeforeDelete(boolean realDeleted) abstract booleanabstract booleanstatic booleancheckSyncPathAvailable(String path, boolean showHidden, boolean showLink, long maxFileSize, List<String> syncPathAllowed, List<String> syncPathIgnored) static booleancheckUsage(RemoteFile rf) abstract booleancomplete()abstract voidabstract booleancreateLink(String target) protected static voiddebugLog(Class clazz, String point, RemoteFile rf, CacheArrayFilter filter) abstract booleandelete()abstract booleanexists()abstract TimestampgetPath()protected static booleanisDebug(RemoteFile remoteFile) booleanisDir()abstract booleanabstract booleanisFile()static booleanabstract booleanisLink()static booleanstatic doublestatic doublememoryUsage(long using) static longabstract booleanmkdirs()abstract voidprotected static Stringabstract byte[]abstract Stringabstract StringreadLink()protected static StringreplacePath(String source) abstract voidsetModifyTime(Timestamp modifyTime) static voidabstract longsize()static voidstopSync()timeZoneConver(String destTimeZone, String srcTimeZone, Timestamp srcDate) protected Stringprotected Stringprotected Stringabstract booleanwrite(byte[] data) abstract booleanwrite(byte[] data, boolean append) voidwrite(int partSize, byte[] allBytes) abstract booleanabstract boolean
-
Field Details
-
TMP_MATCHES_EDIT
- See Also:
-
TMP_MATCHES_VI_SWP
- See Also:
-
TMP_EXT_MODIFY_FILE
- See Also:
-
TMP_EXT_ACCESS_FILE
- See Also:
-
TMP_EXT_CHECK_FILE
- See Also:
-
TMP_WRITING_SWP
- See Also:
-
TMP_WRITING_FOR_REPLACE
- See Also:
-
TMP_WRITING_FILE
- See Also:
-
CHARSET
-
CACHE_ARRAY_FILTER_TIMER
-
LOGIC_TIMEOUT_MS
-
LOGIC_ACCESS_TIMEOUT_MS
-
LOGIC_CHECK_TIMEOUT_MS
-
stopSync
-
syncRoot
-
origin
-
TEMP_DIR
-
debugLogTime
-
SYNC_PATH_ALLOWED
-
SYNC_PATH_IGNORED
-
-
Constructor Details
-
BaseFile
-
BaseFile
-
-
Method Details
-
isFile
- Throws:
IOException
-
isDirectory
- Throws:
IOException
-
isLink
- Throws:
IOException
-
delete
- Throws:
IOException
-
exists
- Throws:
IOException
-
mkdirs
- Throws:
IOException
-
createLink
- Throws:
IOException
-
readLink
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
readAllBytes
- Throws:
IOException
-
readAllString
- Throws:
IOException
-
size
- Throws:
IOException
-
complete
- Throws:
IOException
-
getModifyTime
- Throws:
IOException
-
setModifyTime
- Throws:
IOException
-
copyTo
- Throws:
IOException
-
moveTo
- Throws:
IOException
-
beforeDelete
-
afterDelete
-
beforeMkdirs
-
afterMkdirs
-
beforeCreateLink
-
afterCreateLink
-
beforeWrite
-
afterWrite
-
setTmpDir
- Throws:
IOException
-
getPath
-
getOrigin
-
getParent
-
getParents
-
write
- Throws:
IOException
-
toModifyTmpFilePath
- Throws:
IOException
-
toAccessTmpFilePath
- Throws:
IOException
-
toCheckTmpFilePath
- Throws:
IOException
-
stopSync
-
isStopSync
-
isDebug
-
isHidden
- Throws:
Exception
-
checkSyncPathAvailable
-
isDir
- Throws:
IOException
-
timeZoneConver
public Timestamp timeZoneConver(String destTimeZone, String srcTimeZone, Timestamp srcDate) throws IOException - Throws:
IOException
-
replacePath
-
parsePath
-
checkUsage
-
memoryUsing
-
memoryUsage
-
memoryUsage
-
debugLog
-