-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
60 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Stowage.Impl; | ||
using Xunit; | ||
|
||
namespace Stowage.Test.Integration.Impl { | ||
[Trait("Category", "Integration")] | ||
public class LocalDiskTest { | ||
private readonly ILocalDiskFileStorage _storage; | ||
|
||
public LocalDiskTest() { | ||
_storage = (ILocalDiskFileStorage)Files.Of.LocalDisk(Environment.CurrentDirectory); | ||
} | ||
|
||
[Fact] | ||
public async Task ResolveToNativePath() { | ||
IReadOnlyCollection<IOEntry> entries = await _storage.Ls(); | ||
IOEntry entry = entries.First(); | ||
|
||
string nativePath = _storage.ToNativeLocalPath(entry.Path); | ||
|
||
Assert.True(nativePath.Length > 0); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Stowage.Impl { | ||
|
||
/// <summary> | ||
/// Local disk specific functionality. | ||
/// </summary> | ||
public interface ILocalDiskFileStorage : IFileStorage { | ||
|
||
/// <summary> | ||
/// Converts <see cref="IOPath"/> obtained from local disk storage to native local path, which will be different on different platforms. | ||
/// </summary> | ||
/// <param name="path"></param> | ||
/// <returns></returns> | ||
string ToNativeLocalPath(IOPath path); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters