Пример #1
0
        /**
         * Gets a string set of all the paths of all the files in the given base directory, excluding the /ScriptRunner
         * leg. Paths are relativised to the base directory and path seperators
         * are normalised.
         * @param pFileResolver Resolver for relativising file paths.
         * @return Set of relativised file paths.
         */
        public static HashSet<string> allFilePathsInBaseDirectory(FileResolver pFileResolver)
        {
            HashSet<string> lPathSet = new HashSet<string>();
            //Recursively get all the files in the base directory (exclude the ScriptRunner directory)
            List<FileInfo> lFileList = pFileResolver.getBaseDirectory().GetFiles(".*").Where(x => x.Name != "ScriptRunner").ToList();

            //Relativize each path to the base directory and add to set
            foreach (FileInfo lFile in lFileList)
            {
                lPathSet.Add(normaliseFilePath(pFileResolver.relativeFilePath(lFile)));
            }

            return lPathSet;
        }