Improve file operations, layout memory, and drive status.
Add a sequential file-operations queue with pause, reorder, and optional auto-clear; persist window size and tree width; show free space; and clear leftover indexing status. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -30,6 +30,8 @@ public class BrowseServiceTests
|
||||
var listing = await browse.ListThisPcAsync();
|
||||
var item = Assert.Single(listing.Items);
|
||||
Assert.Equal(1_073_741_824, item.SizeBytes);
|
||||
Assert.Equal(250_000_000, item.FreeSpaceBytes);
|
||||
Assert.Equal(1_000_000_000, item.CapacityBytes);
|
||||
Assert.True(item.IsDirectory);
|
||||
}
|
||||
|
||||
@@ -65,6 +67,7 @@ public class BrowseServiceTests
|
||||
var listing = await browse.ListAsync(@"C:\");
|
||||
var movies = Assert.Single(listing.Items, i => i.Name == "Movies");
|
||||
Assert.Equal(200, movies.SizeBytes);
|
||||
Assert.Equal(250_000_000, movies.FreeSpaceBytes);
|
||||
var loose = Assert.Single(listing.Items, i => i.Name == "loose.txt");
|
||||
Assert.Equal(10, loose.SizeBytes);
|
||||
}
|
||||
@@ -83,7 +86,9 @@ public class BrowseServiceTests
|
||||
Kind = SourceKind.NtfsLocal,
|
||||
RootPath = root,
|
||||
DisplayName = display,
|
||||
VolumeSerial = 1
|
||||
VolumeSerial = 1,
|
||||
CapacityBytes = 1_000_000_000,
|
||||
FreeBytes = 250_000_000
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -128,6 +133,11 @@ file sealed class BrowseVolumes : IVolumeService
|
||||
=> Online.FirstOrDefault(v => path.StartsWith(v.RootPath.TrimEnd('\\'), StringComparison.OrdinalIgnoreCase));
|
||||
public bool IsPathReachable(string path)
|
||||
=> Online.Any(v => path.StartsWith(v.RootPath.TrimEnd('\\'), StringComparison.OrdinalIgnoreCase));
|
||||
public VolumeSpace GetSpace(string path)
|
||||
{
|
||||
var fp = Probe(path);
|
||||
return new VolumeSpace(fp?.CapacityBytes, fp?.FreeBytes);
|
||||
}
|
||||
}
|
||||
|
||||
file sealed class BrowseEnv : IAppEnvironment
|
||||
|
||||
Reference in New Issue
Block a user