C# 클래스 SmartSync.DeploymentRepository

파일 보기 프로젝트 열기: projectkudu/KuduCalf

공개 메소드들

메소드 설명
CreateSnapshotFromDirectory ( DirectoryInfo dirRoot, string comment, bool>.Func filter = null ) : SnapshotId
CreateSnapshotFromFiles ( FileInfo>.IEnumerable fileList, string comment ) : SnapshotId
FromToken ( string tok ) : SnapshotId
GetAddedItemsBetweenSnapshots ( SnapshotId currentId, SnapshotId targetId ) : IEnumerable
GetDeletedItemsBetweenSnapshots ( SnapshotId currentId, SnapshotId targetId ) : IEnumerable
GetLatestSnapshot ( ) : SnapshotInfo
GetLatestSnapshotId ( ) : SnapshotId
GetPreviousSnapshot ( SnapshotInfo snapshotInfo ) : SnapshotInfo
GetPreviousSnapshotId ( SnapshotId snapshotId ) : SnapshotId
GetSnapshotInfo ( SnapshotId snapshotId ) : SnapshotInfo
GetSnapshotItems ( SnapshotId token ) : IEnumerable
Initialize ( ) : bool
ListAllSnapshots ( ) : IEnumerable
ListSnapshotsBetween ( SnapshotId firstId, SnapshotId lastId ) : IEnumerable

List snapshots between first id and last id inclusive.

PopulateDirectoryFromSnapshot ( SnapshotId snapshotId, DirectoryInfo dirRoot ) : void

Copies files from snapshot to dirRoot.

Doesn't delete any data, only adds or modifies data under dirRoot.

ProcessDeletionsBetweenSnapshot ( SnapshotId currentId, SnapshotId targetId, DirectoryInfo dirRoot ) : void
UpdateDirectoryFromSnapshot ( SnapshotId currentId, SnapshotId targetId, DirectoryInfo dirRoot ) : void

보호된 메소드들

메소드 설명
DeploymentRepository ( ) : System
SafeCombinePath ( DirectoryInfo dirInfo, string path ) : string

This does a path concatenation but verifies that the resulting file path is a results in a path underneath the root. This is a security best practice to avoid folks modifying files by creating relative paths such as "foo\..\..\bar"

TryCopyFile ( string src, string dst, bool logCopyFiles = true ) : bool
TryDeleteFile ( string path ) : bool

비공개 메소드들

메소드 설명
ListFilesInDirectory ( DirectoryInfo dirRoot, DirectoryInfo curDir, bool>.Func filter ) : FileInfo>>.IEnumerable

메소드 상세

CreateSnapshotFromDirectory() 공개 메소드

public CreateSnapshotFromDirectory ( DirectoryInfo dirRoot, string comment, bool>.Func filter = null ) : SnapshotId
dirRoot System.IO.DirectoryInfo
comment string
filter bool>.Func
리턴 SnapshotId

CreateSnapshotFromFiles() 공개 추상적인 메소드

public abstract CreateSnapshotFromFiles ( FileInfo>.IEnumerable fileList, string comment ) : SnapshotId
fileList FileInfo>.IEnumerable
comment string
리턴 SnapshotId

DeploymentRepository() 보호된 메소드

protected DeploymentRepository ( ) : System
리턴 System

FromToken() 공개 추상적인 메소드

public abstract FromToken ( string tok ) : SnapshotId
tok string
리턴 SnapshotId

GetAddedItemsBetweenSnapshots() 공개 메소드

public GetAddedItemsBetweenSnapshots ( SnapshotId currentId, SnapshotId targetId ) : IEnumerable
currentId SnapshotId
targetId SnapshotId
리턴 IEnumerable

GetDeletedItemsBetweenSnapshots() 공개 메소드

public GetDeletedItemsBetweenSnapshots ( SnapshotId currentId, SnapshotId targetId ) : IEnumerable
currentId SnapshotId
targetId SnapshotId
리턴 IEnumerable

GetLatestSnapshot() 공개 메소드

public GetLatestSnapshot ( ) : SnapshotInfo
리턴 SnapshotInfo

GetLatestSnapshotId() 공개 추상적인 메소드

public abstract GetLatestSnapshotId ( ) : SnapshotId
리턴 SnapshotId

GetPreviousSnapshot() 공개 메소드

public GetPreviousSnapshot ( SnapshotInfo snapshotInfo ) : SnapshotInfo
snapshotInfo SnapshotInfo
리턴 SnapshotInfo

GetPreviousSnapshotId() 공개 추상적인 메소드

public abstract GetPreviousSnapshotId ( SnapshotId snapshotId ) : SnapshotId
snapshotId SnapshotId
리턴 SnapshotId

GetSnapshotInfo() 공개 추상적인 메소드

public abstract GetSnapshotInfo ( SnapshotId snapshotId ) : SnapshotInfo
snapshotId SnapshotId
리턴 SnapshotInfo

GetSnapshotItems() 공개 추상적인 메소드

public abstract GetSnapshotItems ( SnapshotId token ) : IEnumerable
token SnapshotId
리턴 IEnumerable

Initialize() 공개 추상적인 메소드

public abstract Initialize ( ) : bool
리턴 bool

ListAllSnapshots() 공개 메소드

public ListAllSnapshots ( ) : IEnumerable
리턴 IEnumerable

ListSnapshotsBetween() 공개 메소드

List snapshots between first id and last id inclusive.
public ListSnapshotsBetween ( SnapshotId firstId, SnapshotId lastId ) : IEnumerable
firstId SnapshotId A more recently created snapshot.
lastId SnapshotId An id older than first Id
리턴 IEnumerable

PopulateDirectoryFromSnapshot() 공개 메소드

Copies files from snapshot to dirRoot.
Doesn't delete any data, only adds or modifies data under dirRoot.
public PopulateDirectoryFromSnapshot ( SnapshotId snapshotId, DirectoryInfo dirRoot ) : void
snapshotId SnapshotId The snapshot id
dirRoot System.IO.DirectoryInfo Root to extract
리턴 void

ProcessDeletionsBetweenSnapshot() 공개 메소드

public ProcessDeletionsBetweenSnapshot ( SnapshotId currentId, SnapshotId targetId, DirectoryInfo dirRoot ) : void
currentId SnapshotId
targetId SnapshotId
dirRoot System.IO.DirectoryInfo
리턴 void

SafeCombinePath() 보호된 메소드

This does a path concatenation but verifies that the resulting file path is a results in a path underneath the root. This is a security best practice to avoid folks modifying files by creating relative paths such as "foo\..\..\bar"
protected SafeCombinePath ( DirectoryInfo dirInfo, string path ) : string
dirInfo System.IO.DirectoryInfo
path string
리턴 string

TryCopyFile() 보호된 메소드

protected TryCopyFile ( string src, string dst, bool logCopyFiles = true ) : bool
src string
dst string
logCopyFiles bool
리턴 bool

TryDeleteFile() 보호된 메소드

protected TryDeleteFile ( string path ) : bool
path string
리턴 bool

UpdateDirectoryFromSnapshot() 공개 메소드

public UpdateDirectoryFromSnapshot ( SnapshotId currentId, SnapshotId targetId, DirectoryInfo dirRoot ) : void
currentId SnapshotId
targetId SnapshotId
dirRoot System.IO.DirectoryInfo
리턴 void