Exemplo n.º 1
0
        public void displayResults()
        {
            var buffer     = new StringBuilder(SearchDefinitions.WINDOWS_PATH_LENTH_LIMIT);
            var numResults = NativeMethods.Everything_GetNumResults();

            if (numResults == 0)
            {
                return;
            }

            if (m_ArgList.Contains(SearchDefinitions.COUNT))
            {
                printCount(numResults);
                return;
            }

            for (uint i = 0; i < numResults; i++)
            {
                NativeMethods.Everything_GetResultFullPathName(i, buffer, (uint)buffer.Capacity);
                string windowsPath = buffer.ToString();
                buffer.Clear();
                string wslPath = ParseWslPath.winToWsl(windowsPath);
                printResult(wslPath);
            }
        }
Exemplo n.º 2
0
        private void matchSpecificPath(StringBuilder queryBuilder)
        {
            string path = m_argValues[SearchDefinitions.ONLYIN];

            // convert to windows path and validate it
            path = ParseWslPath.wslToWin(path);
            queryBuilder.Append($"\"{path}\"");
            addClosingSpace(queryBuilder);
        }