Beispiel #1
0
 public FileMetadata UpdateMetadata(string username, FileMetadata aFileMetadata, FileBlobdata aFileBlobdata)
 {
     //if NO conflict, save the Metadata in local database & save Blobdata in Blob Server, then update FileMetadata and return
     //if conflict, reject this update and return error reason in FileMetadata. Then let client to rename the file and upate again
     //Future Plan: Maybe the Blobdata can be saved to avoid upload again, but need a mechanism to collect garbage if client does not update again.
     return null;
 }
Beispiel #2
0
 public static SHA256 GetSHA(FileMetadata metadata, FileBlobdata blobdata)
 {
     //The SHA will be used to be the blobKey
     //Only some parts of metadata should be used in calculating SHA: filename, parent, globalCounter, timestamp, fileData.
     //The other fileds of the metadata maybe updated in future.
     //Reference http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha256%28v=vs.110%29.aspx
     return null;
 }
Beispiel #3
0
 // local metadata should be udate on delete a file
 public bool DeleteMetadate(string username, FileMetadata aFileMetadata)
 {
     return false;
 }
 public bool UpdateFile(string filename, FileMetadata blobInfo)
 {
     //write file from cloud (specifed by BlobInfo) to local disk
     return false;
 }
Beispiel #5
0
 public FileMetadata UploadFile(FileMetadata aFileMetadata, FileBlobdata aFileBlobdata)
 {
     return null;
 }
Beispiel #6
0
 public bool DeleteFile(FileMetadata aFileMetadata)
 {
     return false;
 }
Beispiel #7
0
 public bool DownloadFile(FileMetadata blobInfo)
 {
     return true;
 }
 // local metadata should be udate on create / update a file. There metadata is from master server, for the SHA is calculated on master server.
 public bool UpdateMetadata(FileMetadata aFileMetadata)
 {
     //overwrite into sLocalMetadata
     SaveLocalMetadate();
     return false;
 }
 // local metadata should be udate on delete a file
 public bool DeleteMetadate(FileMetadata aFileMetadata)
 {
     //delete from sLocalMetadata
     SaveLocalMetadate();
     return false;
 }