Skip to content

Commit

Permalink
Added a method to retreive disks roots
Browse files Browse the repository at this point in the history
  • Loading branch information
ju2pom committed Sep 18, 2017
1 parent 5efbfcd commit 88a5fbf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions EverythingNet.Tests/FileSearchTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,13 @@ public string Duplicates(string search)

return queryable.ToString();
}

[Test]
public void Roots()
{
var queryable = this.everyThing.Search().File().Roots();

Assert.That(queryable.ToString(), Is.EqualTo("root:"));
}
}
}
2 changes: 2 additions & 0 deletions EverythingNet/Interfaces/IFileQueryable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ public interface IFileQueryable : IQueryable
{
IQueryable Only();

IQueryable Roots();

IQueryable Audio(string search = null);

IQueryable Zip(string search = null);
Expand Down
5 changes: 5 additions & 0 deletions EverythingNet/Query/FileQueryable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ public IQueryable Only()
return this.Macro("file:", string.Empty);
}

public IQueryable Roots()
{
return this.Macro("root:", string.Empty);
}

public IQueryable Audio(string search = null)
{
return this.Macro($"ext:{AudioExt}", search);
Expand Down

0 comments on commit 88a5fbf

Please sign in to comment.