Method | Description | |
---|---|---|
AddFile ( string path, System.DateTime serverSideModificationDate, string[]>.Dictionary |
Add a file to the database. If checksum is not null, it will be used for the database entry
|
|
AddFolder ( string path, System.DateTime serverSideModificationDate ) : void |
Add a folder to the database.
|
|
ContainsFile ( string path ) : bool |
Checks whether the database contains a given file.
|
|
ContainsFolder ( string path ) : bool |
Checks whether the database contains a given folder.
|
|
Database ( string dataPath ) : System |
Constructor.
|
|
Dispose ( ) : void |
Implement IDisposable interface.
|
|
GetChangeLogToken ( ) : string |
Get the ChangeLog token that was stored at the end of the last successful CmisSync synchronization.
|
|
GetSQLiteConnection ( ) : SQLiteConnection |
Connection to the database. The sqliteConnection must not be used directly, used this method instead.
|
|
GetServerSideModificationDate ( string path ) : DateTime? |
Get the time at which the file was last modified. This is the time on the CMIS server side, in UTC. Client-side time does not matter.
|
|
LocalFileHasChanged ( string path ) : bool |
Check whether a file's content has changed locally since it was last synchronized. This happens when the user edits a file on the local computer. This method does not communicate with the CMIS server, it just checks whether the checksum has changed.
|
|
MoveFile ( string oldPath, string newPath ) : void |
Move a file.
|
|
MoveFolder ( string oldPath, string newPath ) : void |
Move a folder.
|
|
RecalculateChecksum ( string path ) : void |
Recalculate the checksum of a file and save it to database.
|
|
RemoveFile ( string path ) : void |
Remove a file from the database.
|
|
RemoveFolder ( string path ) : void |
Remove a folder from the database.
|
|
SetChangeLogToken ( string token ) : void |
Set the stored ChangeLog token. This should be called after each successful CmisSync synchronization.
|
|
SetFileServerSideModificationDate ( string path, DateTime serverSideModificationDate ) : void |
Set the last modification date of a file. This is the time on the CMIS server side, in UTC. Client-side time does not matter. TODO Combine this method and the next in a new method ModifyFile, and find out if GetServerSideModificationDate is really needed.
|
Method | Description | |
---|---|---|
Dispose ( bool disposing ) : void |
Dispose pattern implementation.
|
Method | Description | |
---|---|---|
AddFile ( string path, System.DateTime serverSideModificationDate, string[]>.Dictionary |
||
Checksum ( string filePath ) : string |
Calculate the SHA1 checksum of a file. Code from http://stackoverflow.com/a/1993919/226958
|
|
ChecksumToString ( byte hash ) : string |
Transforms a given hash into a string
|
|
ComposeSQLCommand ( |
Helper method to fill the parameters inside an SQL command.
|
|
ExecuteSQLAction ( string text, object>.Dictionary |
Helper method to execute an SQL command that does not return anything.
|
|
ExecuteSQLFunction ( string text, object>.Dictionary |
Helper method to execute an SQL command that returns something.
|
|
Json ( string[]>.Dictionary |
Put all the values of a dictionary into a JSON string.
|
|
Normalize ( string path ) : string |
Normalize a path. All paths stored in database must be normalized. Goals: - Make data smaller in database - Reduce OS-specific differences
|
public AddFile ( string path, System.DateTime serverSideModificationDate, string[]>.Dictionary |
||
path | string | |
serverSideModificationDate | System.DateTime | |
metadata | string[]>.Dictionary | |
filehash | byte | |
return | void |
public AddFolder ( string path, System.DateTime serverSideModificationDate ) : void | ||
path | string | |
serverSideModificationDate | System.DateTime | |
return | void |
public GetSQLiteConnection ( ) : SQLiteConnection | ||
return | SQLiteConnection |
public GetServerSideModificationDate ( string path ) : DateTime? | ||
path | string | |
return | DateTime? |
public LocalFileHasChanged ( string path ) : bool | ||
path | string | |
return | bool |
public MoveFile ( string oldPath, string newPath ) : void | ||
oldPath | string | |
newPath | string | |
return | void |
public MoveFolder ( string oldPath, string newPath ) : void | ||
oldPath | string | |
newPath | string | |
return | void |
public RecalculateChecksum ( string path ) : void | ||
path | string | |
return | void |
public SetChangeLogToken ( string token ) : void | ||
token | string | |
return | void |
public SetFileServerSideModificationDate ( string path, DateTime serverSideModificationDate ) : void | ||
path | string | |
serverSideModificationDate | DateTime | |
return | void |