public static string ToFileSystemPath( this string uri, string path ) { bool isDir = uri.EndsWith(@"/"); if (isDir) { // Note: append the directory end tag "/" return path + FileNameHelpers.GetDirectoryName(uri) + "/"; } else { // The path is a file... return path + FileNameHelpers.GetFileName( uri ); } }