Пример #1
0
        private void pollFile(CloudBlockBlob file, string fileFullPath, DateTime timestamp)
        {
            string directoryPath = Path.GetDirectoryName(fileFullPath);
            // Determine whether the directory exists.
            if (!Directory.Exists(directoryPath))
            {
                // create the directory.
                DirectoryInfo di = Directory.CreateDirectory(directoryPath);
            }

            //*****comment out these lines if do not want to download from snapshot
            VCmanager vc = new VCmanager(this.sasUri);
            LocalFileSysAccess.LocalFileSys save = new LocalFileSys();
            save.downloadfile(vc.getLatestSnapshot(file), fileFullPath, timestamp);
            //*****comment out these lines if do not want to download from snapshot**

            /****download from original file************************
            LocalFileSysAccess.LocalFileSys save = new LocalFileSys();
            save.downloadfile(file, fileFullPath, timestamp);
            /******************************************************/

            //updatetimestamp.settimestamp(fileFullPath, timestamp);
        }