InternalCombine() static private method

static private InternalCombine ( String path1, String path2 ) : String
path1 String
path2 String
return String
Beispiel #1
0
        SearchResult CreateSearchResult(SearchData localSearchData, FindData findData)
        {
            String userPathFinal = PathHelperMethods.InternalCombine(localSearchData.userPath, findData.FileName);
            String fullPathFinal = PathHelperMethods.InternalCombine(localSearchData.fullPath, findData.FileName);

            return(new SearchResult(fullPathFinal, userPathFinal, findData));
        }
Beispiel #2
0
        static String GetFullSearchString(String fullPath, String searchPattern)
        {
            Contract.Requires(fullPath != null);
            Contract.Requires(searchPattern != null);

            String tempStr = PathHelperMethods.InternalCombine(fullPath, searchPattern);

            // If path ends in a trailing slash (\), append a * or we'll get a "Cannot find the file specified" exception
            char lastChar = tempStr[tempStr.Length - 1];

            if (PathHelperMethods.IsDirectorySeparator(lastChar) || lastChar == Path.VolumeSeparatorChar)
            {
                tempStr = tempStr + '*';
            }

            return(tempStr);
        }