Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Dahlby <dahlbyk@gmail.com>2011-10-03 03:50:24 +0400
committernulltoken <emeric.fermas@gmail.com>2012-03-06 17:55:47 +0400
commit5e770b8517ad2e5bf06022837fe519f53b2e687b (patch)
tree0ba9a8dbe599cdfeb448e16f31d17d4dd1e266f3 /LibGit2Sharp/Core/FilePath.cs
parent69229e6c26e5fef43d54732421c88204a63f5aa5 (diff)
Add FilePath and FilePathMarshaler
Diffstat (limited to 'LibGit2Sharp/Core/FilePath.cs')
-rw-r--r--LibGit2Sharp/Core/FilePath.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/LibGit2Sharp/Core/FilePath.cs b/LibGit2Sharp/Core/FilePath.cs
new file mode 100644
index 00000000..8860834f
--- /dev/null
+++ b/LibGit2Sharp/Core/FilePath.cs
@@ -0,0 +1,34 @@
+namespace LibGit2Sharp.Core
+{
+ internal class FilePath
+ {
+ private readonly string native;
+ private readonly string posix;
+
+ private FilePath(string path)
+ {
+ native = PosixPathHelper.ToNative(path);
+ posix = PosixPathHelper.ToPosix(path);
+ }
+
+ public string Native
+ {
+ get { return native; }
+ }
+
+ public string Posix
+ {
+ get { return posix; }
+ }
+
+ public override string ToString()
+ {
+ return Native;
+ }
+
+ public static implicit operator FilePath(string path)
+ {
+ return path == null ? null : new FilePath(path);
+ }
+ }
+}