Ejemplo n.º 1
0
 /// <summary>
 /// Constructor for FileData that got from Remote.
 /// </summary>
 /// <param name="relativepath">Relative path got from Host.</param>
 /// <param name="hashmd5">Hash got from Host.</param>
 /// <param name="fileSize">Size of the Host file in bytes.</param>
 /// <param name="lastWriteTime">"MM/dd/yyyy HH:mm" format of time file was last modified.</param>
 public FileData(string relativepath, string hashmd5, long fileSize, string lastWriteTime)
 {
     localPath    = "";
     relativePath = relativepath;
     hashMD5      = hashmd5;
     fms          = FileModifiedStatus.Untouched;
     ts           = new TimeSize(fileSize, lastWriteTime);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor for FileData that got from Local.
        /// </summary>
        /// <param name="SyncPath">Path to the directory that has to be syncronized.</param>
        /// <param name="localpath">Local path to a file.</param>
        public FileData(string SyncPath, string localpath)
        {
            localPath    = localpath;
            relativePath = localPath.Replace(SyncPath, "");
            hashMD5      = "";
            fms          = FileModifiedStatus.Untouched;

            FileInfo fi = new FileInfo(localpath);

            ts = new TimeSize(fi.Length, fi.LastWriteTime.ToString("MM/dd/yyyy HH:mm"));
        }