Permalink
Browse files

add todos

  • Loading branch information...
1 parent 17dc259 commit 029e33f47f928acf827b686639d6046b51263c1d @hbons committed Aug 3, 2011
Showing with 9 additions and 2 deletions.
  1. +4 −2 Chunker.cs
  2. +5 −0 Index.cs
View
@@ -83,6 +83,8 @@ public void FileToChunks (string [] source_file_paths)
string chunk_container_path = Path.Combine (OutputDirectory, chunk_container);
string chunk_file_path = Path.Combine (chunk_container_path, chunk_file_name);
+ // TODO: Calculate SHA1 hash of the full file here too
+
if (!File.Exists (chunk_file_path)) {
if (!Directory.Exists (chunk_container_path))
Directory.CreateDirectory (chunk_container_path);
@@ -98,7 +100,7 @@ public void FileToChunks (string [] source_file_paths)
chunk_paths.Add (chunk_file_path);
- if (ChunkCreated != null)
+ if (ChunkCreated != null) // TODO: return full file hash too
ChunkCreated (chunk_file_path, current_chunk_size, hash);
Console.WriteLine ("Chunk " + hash + " created");
@@ -110,7 +112,7 @@ public void FileToChunks (string [] source_file_paths)
chunk_number++;
}
- } catch (IOException exception) {
+ } catch (IOException) {
foreach (string new_chunk_path in new_chunk_paths) {
if (File.Exists (new_chunk_path))
File.Delete (new_chunk_path); // TODO: what to do with ongoing transfers?
View
@@ -90,6 +90,11 @@ public void Commit ()
}
+ public void Status ()
+ {
+ }
+
+
public void Checkout (string commit_hash)
{
Chunker chunker = new Chunker (DatabasePath,

0 comments on commit 029e33f

Please sign in to comment.