static void TestFileWriteRead(VirtualNode file, Random r, int index, int length) { byte[] towrite = CreateTestBytes(r, length); file.Write(index, towrite); byte[] toread = file.Read(index, length); if (!Compare(towrite, toread)) { throw new Exception("File read/write at " + index + " for " + length + " bytes, failed for file " + file.Name); } }
public byte[] Read(int index, int length) { return(mNode.Read(index, length)); }