C# 클래스 GuiLabs.FileUtilities.DirectoryContentsCache

For large remote folders it can take hours just to enumerate the contents of the remote folder. For unreliable connections restarting ContentSync will require re-reading the contents from scratch again. To avoid this repeated cost, once the contents of the remote folder have been read we flush it to disk. If at any time after that ContentSync encounters errors, the cache will persist until ContentSync is invoked next time. However upon successful completion the cache is cleared.
파일 보기 프로젝트 열기: KirillOsenkov/ContentSync 1 사용 예제들

공개 메소드들

메소드 설명
ClearWrittenFilesFromCache ( ) : void
SaveToCache ( string rootFolder, string pattern, HashSet files, HashSet folders ) : void
TryReadFromCache ( string rootFolder, string pattern, HashSet files, HashSet folders ) : bool

비공개 메소드들

메소드 설명
GetCacheFilePaths ( string rootFolder, string pattern, string &fileListFilePath, string &folderListFilePath ) : void

메소드 상세

ClearWrittenFilesFromCache() 공개 정적인 메소드

public static ClearWrittenFilesFromCache ( ) : void
리턴 void

SaveToCache() 공개 정적인 메소드

public static SaveToCache ( string rootFolder, string pattern, HashSet files, HashSet folders ) : void
rootFolder string
pattern string
files HashSet
folders HashSet
리턴 void

TryReadFromCache() 공개 정적인 메소드

public static TryReadFromCache ( string rootFolder, string pattern, HashSet files, HashSet folders ) : bool
rootFolder string
pattern string
files HashSet
folders HashSet
리턴 bool