Skip to content

Commit e34dd9b

Browse files
mii9000iislam
andauthored
feat: add IPath.GetFullPath(string,string) (#657)
Co-authored-by: iislam <ibrahim.islam@agoda.com>
1 parent d93bb8d commit e34dd9b

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

src/System.IO.Abstractions/IPath.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ public interface IPath
3636
string GetFileNameWithoutExtension(string path);
3737
/// <inheritdoc cref="Path.GetFullPath(string)"/>
3838
string GetFullPath(string path);
39+
#if FEATURE_ADVANCED_PATH_OPERATIONS
40+
/// <inheritdoc cref="Path.GetFullPath(string, string)"/>
41+
string GetFullPath(string path, string basePath);
42+
#endif
3943
/// <inheritdoc cref="Path.GetInvalidFileNameChars"/>
4044
char[] GetInvalidFileNameChars();
4145
/// <inheritdoc cref="Path.GetInvalidPathChars"/>

src/System.IO.Abstractions/PathBase.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ internal PathBase() { }
6363
/// <inheritdoc cref="Path.GetFullPath(string)"/>
6464
public abstract string GetFullPath(string path);
6565

66+
#if FEATURE_ADVANCED_PATH_OPERATIONS
67+
/// <inheritdoc cref="Path.GetFullPath(string, string)"/>
68+
public abstract string GetFullPath(string path, string basePath);
69+
#endif
70+
6671
/// <inheritdoc cref="Path.GetInvalidFileNameChars"/>
6772
public abstract char[] GetInvalidFileNameChars();
6873

src/System.IO.Abstractions/PathWrapper.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ public override string GetFullPath(string path)
8383
return Path.GetFullPath(path);
8484
}
8585

86+
# if FEATURE_ADVANCED_PATH_OPERATIONS
87+
public override string GetFullPath(string path, string basePath)
88+
{
89+
return Path.GetFullPath(path, basePath);
90+
}
91+
#endif
92+
8693
public override char[] GetInvalidFileNameChars()
8794
{
8895
return Path.GetInvalidFileNameChars();

0 commit comments

Comments
 (0)