public void FromYaml_DeserializedCorrectly() { var target = GitBinDocument.FromYaml(new StringReader(expectedYaml)); Assert.AreEqual("name", target.Filename); Assert.AreEqual(2, target.ChunkHashes.Count); Assert.AreEqual("abcde", target.ChunkHashes[0]); Assert.AreEqual("zyxwv", target.ChunkHashes[1]); }
public void Execute() { var stdin = Console.OpenStandardInput(); var document = GitBinDocument.FromYaml(new StreamReader(stdin)); GitBinConsole.Write("Smudging {0}:", document.Filename); DownloadMissingFiles(document.ChunkHashes); OutputReassembledChunks(document.ChunkHashes); }
public void Execute() { var stdin = Console.OpenStandardInput(); var document = GitBinDocument.FromYaml(new StreamReader(stdin)); GitBinConsole.Write("Smudging {0}...", document.Filename); DownloadMissingFiles(document.ChunkHashes); OutputReassembledChunks(document.ChunkHashes); /* TODO: move to SparkleShare * string filepath = Path.Combine (Environment.CurrentDirectory, * document.Filename.Replace("/", Path.DirectorySeparatorChar.ToString())); * * FileInfo fileInfo = new FileInfo(filepath); * fileInfo.CreationTimeUtc = new DateTime(1970, 1, 1).AddSeconds(document.CreationTime); * fileInfo.LastWriteTimeUtc = new DateTime(1970, 1, 1).AddSeconds(document.LastWriteTime); */ }