Class UriUtils
  
  
  
  
  
  Assembly: Xareus.Utils.dll
  Syntax
  
    public static class UriUtils
   
  Methods
  
  EnsureRelativePrefix(string)
  Make sure the relative path starts with ./ or ../
Note this will transform the path separator to '/'
 
  
  Declaration
  
    public static string EnsureRelativePrefix(string path)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | string | 
        path | 
         | 
      
    
  
  Returns
  
  
  GetAbsoluteFilePath(string, string, bool)
  Get the absolute file path relative to the absolute given path or file if necessary
Note : The returned path will use '/' as directory separator
 
  
  Declaration
  
    public static string GetAbsoluteFilePath(string filePath, string relativeTo, bool relativeToPath = false)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | string | 
        filePath | 
         | 
      
      
        | string | 
        relativeTo | 
         | 
      
      
        | bool | 
        relativeToPath | 
        if the relativeTo string a path 
 | 
      
    
  
  Returns
  
  
  GetFileSystemPath(Uri)
  Get a file system compatible string representing the given relative or absolute uri
 
  
  Declaration
  
    public static string GetFileSystemPath(this Uri uri)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | Uri | 
        uri | 
         | 
      
    
  
  Returns
  
  
  GetParentPath(string)
  Get the parent path of the given Uri string.
 
  
  Declaration
  
    public static string GetParentPath(this string path)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | string | 
        path | 
        The Uri can be either for a path or a file 
 | 
      
    
  
  Returns
  
  
  GetRelativePath(string, string)
  Get the given file path relative to the other absolute path
 
  
  Declaration
  
    public static string GetRelativePath(string filePath, string relativeTo)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | string | 
        filePath | 
         | 
      
      
        | string | 
        relativeTo | 
        Must be an absolute path 
 | 
      
    
  
  Returns
  
  
  IsInPath(string, string)
  Returns true if the possible sub-path is contained in the given parent path, meaning it is a direct or indirect, existing or not
file or sub-folder of the parent path
 
  
  Declaration
  
    public static bool IsInPath(string parentPath, string possibleSubPath)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | string | 
        parentPath | 
         | 
      
      
        | string | 
        possibleSubPath | 
         | 
      
    
  
  Returns
  
  
  PathCombine(string, string)
  
  
  Declaration
  
    public static string PathCombine(string parentPath, string pathRelativeToParent)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | string | 
        parentPath | 
         | 
      
      
        | string | 
        pathRelativeToParent | 
         | 
      
    
  
  Returns
  
  
  ToUri(string)
  Transforms the given filePath to a Uri
 
  
  Declaration
  
    public static Uri ToUri(this string filePath)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | string | 
        filePath | 
         | 
      
    
  
  Returns