private void CacheDirectories()
 {
     if (Directories == null)
     {
         Directories = new HashSet <DirectoryReference>(Directory.EnumerateDirectoryReferences());
     }
 }
        static void FindFilesInternalRecursive(DirectoryReference Directory, string[] ExcludedDirectorySuffixes, List <FileReference> FoundFiles)
        {
            FindFilesInternal(Directory, ExcludedDirectorySuffixes, FoundFiles);

            foreach (DirectoryReference SubDirectory in Directory.EnumerateDirectoryReferences())
            {
                if (ShouldInclude(SubDirectory, ExcludedDirectorySuffixes))
                {
                    FindFilesInternalRecursive(SubDirectory, ExcludedDirectorySuffixes, FoundFiles);
                }
            }
        }
Example #3
0
 /// <summary>
 /// Find paths to all the plugins under a given parent directory (recursively)
 /// </summary>
 /// <param name="ParentDirectory">Parent directory to look in. Plugins will be found in any *subfolders* of this directory.</param>
 /// <param name="FileNames">List of filenames. Will have all the discovered .uplugin files appended to it.</param>
 static void EnumeratePluginsInternal(DirectoryReference ParentDirectory, List <FileReference> FileNames)
 {
     foreach (DirectoryReference ChildDirectory in ParentDirectory.EnumerateDirectoryReferences())
     {
         int InitialFileNamesCount = FileNames.Count;
         foreach (FileReference PluginFile in ChildDirectory.EnumerateFileReferences("*.uplugin"))
         {
             FileNames.Add(PluginFile);
         }
         if (FileNames.Count == InitialFileNamesCount)
         {
             EnumeratePluginsInternal(ChildDirectory, FileNames);
         }
     }
 }