@@ -23,13 +23,11 @@ public interface IFileSystem
2323 IEnumerable < string > GetDirectories ( string path ) ;
2424 IEnumerable < string > GetDirectories ( string path , string pattern ) ;
2525 IEnumerable < string > GetDirectories ( string path , string pattern , SearchOption searchOption ) ;
26- string GetDirectoryName ( string path ) ;
2726 string GetFileNameWithoutExtension ( string fileName ) ;
2827 IEnumerable < string > GetFiles ( string path ) ;
2928 IEnumerable < string > GetFiles ( string path , string pattern ) ;
3029 IEnumerable < string > GetFiles ( string path , string pattern , SearchOption searchOption ) ;
3130 string GetFullPath ( string path ) ;
32- string GetParentDirectory ( string path ) ;
3331 string GetRandomFileName ( ) ;
3432 string GetTempPath ( ) ;
3533 Stream OpenRead ( string path ) ;
@@ -46,6 +44,7 @@ public interface IFileSystem
4644 void WriteLines ( string path , string [ ] contents ) ;
4745
4846 char DirectorySeparatorChar { get ; }
47+ string GetProcessDirectory ( ) ;
4948 }
5049
5150
@@ -102,11 +101,6 @@ public string GetFullPath(string path)
102101 return Path . GetFullPath ( path ) ;
103102 }
104103
105- public string GetDirectoryName ( string path )
106- {
107- return Path . GetDirectoryName ( path ) ;
108- }
109-
110104 public bool DirectoryExists ( string path )
111105 {
112106 return Directory . Exists ( path ) ;
@@ -118,11 +112,6 @@ public bool ExistingPathIsDirectory(string path)
118112 return ( attr & FileAttributes . Directory ) == FileAttributes . Directory ;
119113 }
120114
121- public string GetParentDirectory ( string path )
122- {
123- return Directory . GetParent ( path ) . FullName ;
124- }
125-
126115 public IEnumerable < string > GetDirectories ( string path , string pattern )
127116 {
128117 return Directory . GetDirectories ( path , pattern ) ;
@@ -163,7 +152,7 @@ public IEnumerable<string> GetFiles(string path, string pattern, SearchOption se
163152 yield break ;
164153
165154#if ENABLE_MONO
166- if ( NPath . IsLinux )
155+ if ( NPath . IsUnix )
167156 {
168157 try
169158 {
@@ -177,7 +166,7 @@ public IEnumerable<string> GetFiles(string path, string pattern, SearchOption se
177166 {
178167 var realdir = dir ;
179168#if ENABLE_MONO
180- if ( NPath . IsLinux )
169+ if ( NPath . IsUnix )
181170 {
182171 try
183172 {
@@ -242,6 +231,11 @@ public string GetCurrentDirectory()
242231 return Directory . GetCurrentDirectory ( ) ;
243232 }
244233
234+ public string GetProcessDirectory ( )
235+ {
236+ return Directory . GetCurrentDirectory ( ) ;
237+ }
238+
245239 public void WriteAllText ( string path , string contents )
246240 {
247241 File . WriteAllText ( path , contents ) ;
0 commit comments