コード例 #1
0
        private static bool IsDotPath(SccFileSystemNode result)
        {
            string p = result.Name;

            if (p.Length == 1 && p[0] == '.')
                return true;
            else if (p.Length == 2 && p == "..")
                return true;

            return false;
        }
コード例 #2
0
        static IEnumerable<SccFileSystemNode> DoGetDirectoryNodes(SccFileSystemNode result, SafeFindHandle findHandle)
        {
            string basePath = result._basePath;
            using (findHandle)
            {
                if (!IsDotPath(result))
                    yield return result;

                NativeMethods.WIN32_FIND_DATA data;
                while (NativeMethods.FindNextFileW(findHandle, out data))
                {
                    result = new SccFileSystemNode(basePath, data);
                    if (!IsDotPath(result))
                        yield return result;
                }
            }
        }