Amazon.KinesisTap.AutoUpdate/UpdateUtility.cs
/// <summary>
/// Resolve relative path (to KinesisTap) and expand environment variables such as %temp%
/// </summary>
/// <param name="path">Path to resolve</param>
/// <returns>Resolved path</returns>
Resolve relative path (to KinesisTap) and expand environment variables such as %temp%
Resolve relative path ( to KinesisTap ) and expand environment variables such as %temp%
public static string ResolvePath(string path)
        {
            string directory = Path.GetDirectoryName(path);
            string filename = Path.GetFileName(path);
            if (string.IsNullOrEmpty(directory) || directory.Equals("."))
            {
                string kinesisTapDirectory = Path.GetDirectoryName(ProgramInfo.KinesisTapPath);
                path = Path.Combine(kinesisTapDirectory, filename);
            }
            return Environment.ExpandEnvironmentVariables(path);
        }
public static string ResolvePath ( string path ) { string directory = Path . GetDirectoryName ( path ) ; string filename = Path . GetFileName ( path ) ; if ( string . IsNullOrEmpty ( directory ) || directory . Equals ( " " ) ) { string kinesisTapDirectory = Path . GetDirectoryName ( ProgramInfo . KinesisTapPath ) ; path = Path . Combine ( kinesisTapDirectory , filename ) ; } return Environment . ExpandEnvironmentVariables ( path ) ; }
Resolve relative path (to KinesisTap) and expand environment variables such as %temp%
Resolve relative path ( to KinesisTap ) and expand environment variables such as %temp%
None
path
string
Path to resolve
Path to resolve