Skip to content

Commit

Permalink
fix(FileSystemLink): remove IsDirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
richardschneider committed Aug 29, 2019
1 parent fd4a86b commit 455eef6
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/CoreApi/FileSystemApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ internal FileSystemApi(IpfsClient ipfs)
Name = (string)l["Name"],
Id = (string)l["Hash"],
Size = (long)l["Size"],
IsDirectory = (string)l["Type"] == "Directory",
})
.ToArray();
}
Expand Down
3 changes: 0 additions & 3 deletions src/FileSystemLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,5 @@ public class FileSystemLink : IFileSystemLink

/// <inheritdoc />
public long Size { get; set; }

/// <inheritdoc />
public bool IsDirectory { get; set; }
}
}
1 change: 0 additions & 1 deletion src/FileSystemNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ public IFileSystemLink ToLink(string name = "")
Name = string.IsNullOrWhiteSpace(name) ? Name : name,
Id = Id,
Size = Size,
IsDirectory = IsDirectory
};
return link;
}
Expand Down
8 changes: 0 additions & 8 deletions test/CoreApi/FileSystemApiTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ public void AddDirectory()
Assert.AreEqual(2, files.Length);
Assert.AreEqual("alpha.txt", files[0].Name);
Assert.AreEqual("beta.txt", files[1].Name);
Assert.IsFalse(files[0].IsDirectory);
Assert.IsFalse(files[1].IsDirectory);

Assert.AreEqual("alpha", ipfs.FileSystem.ReadAllTextAsync(files[0].Id).Result);
Assert.AreEqual("beta", ipfs.FileSystem.ReadAllTextAsync(files[1].Id).Result);
Expand Down Expand Up @@ -234,9 +232,6 @@ public void AddDirectoryRecursive()
Assert.AreEqual("alpha.txt", files[0].Name);
Assert.AreEqual("beta.txt", files[1].Name);
Assert.AreEqual("x", files[2].Name);
Assert.IsFalse(files[0].IsDirectory);
Assert.IsFalse(files[1].IsDirectory);
Assert.IsTrue(files[2].IsDirectory);
Assert.AreNotEqual(0, files[0].Size);
Assert.AreNotEqual(0, files[1].Size);

Expand All @@ -248,8 +243,6 @@ public void AddDirectoryRecursive()
Assert.AreEqual(2, xfiles.Length);
Assert.AreEqual("x.txt", xfiles[0].Name);
Assert.AreEqual("y", xfiles[1].Name);
Assert.IsFalse(xfiles[0].IsDirectory);
Assert.IsTrue(xfiles[1].IsDirectory);

var yfiles = new FileSystemNode
{
Expand All @@ -258,7 +251,6 @@ public void AddDirectoryRecursive()
}.Links.ToArray();
Assert.AreEqual(1, yfiles.Length);
Assert.AreEqual("y.txt", yfiles[0].Name);
Assert.IsFalse(yfiles[0].IsDirectory);

var y = new FileSystemNode
{
Expand Down

0 comments on commit 455eef6

Please sign in to comment.