private string GetPath(ChunkHash hash) { string hex = hash.ToHex(); #if DEBUG if (hex.Length != 64) //32 bytes { throw new InvalidDataException(); } #endif string path = dataRoot; //FAT32 has a file per folder limit of slightly below 16 bits //Total 32 bytes = 64 characters hex path = Path.Combine(path, hex.Substring(0, 2)); path = Path.Combine(path, hex.Substring(0, 4)); path = Path.Combine(path, hex.Substring(0, 6)); path = Path.Combine(path, hex); return(path); }
private string GetPath(ChunkHash hash) { string hex = hash.ToHex (); #if DEBUG if(hex.Length != 64) //32 bytes throw new InvalidDataException(); #endif string path = dataRoot; //FAT32 has a file per folder limit of slightly below 16 bits //Total 32 bytes = 64 characters hex path = Path.Combine (path, hex.Substring (0, 2)); path = Path.Combine (path, hex.Substring (0, 4)); path = Path.Combine (path, hex.Substring (0, 6)); path = Path.Combine (path, hex); return path; }