import { BaseManagedFile } from '../file'; /** * Base class for creating managers, these can dynamically load and reload files for the framework. */ export declare abstract class BaseManager extends BaseManagedFile { /** All the loaded files of the manager */ protected abstract files: BaseManagedFile[]; /** * @param {string} filePath - The absolute path of the current file. */ constructor(filePath: string); /** * Called to start the processes needed for the manager. i.e. fetch managed files. */ abstract init(): Promise | void; /** * "Reloads" all managed files. * This removes each file from the cache and Node will re-load them once they're required again. */ reloadAllFiles(): void; /** * Fetches all files in a given directory, returning the required files found within it. * @param {string} directoryPath - The directory to crawl through. * @param {Object} options - The options for fetching * @param {boolean} [options.shouldUseIndex = true] - Whether index files should be used when a directory has one, ignoring the other files within it. * @param {string[]} [options.exportedModuleNames = []] - The exported module names that you want to required. * @param {Object[]} [options.constructorArguments = []] - The arguments passed to the constructor of required files. * @returns {BaseManagedFile[]} */ protected fetchDirectoryFiles(directoryPath: string, { shouldUseIndex, exportedModuleNames, constructorArguments, }: { shouldUseIndex?: boolean; exportedModuleNames?: string[]; constructorArguments?: any[]; }): Promise; /** * @param {string} directoryPath - The directory that contains the file being required. * @param {string} fileName - The name of the file being required. * @param {string[]} moduleNames - The names of the modules wanted to be required. * @param {string[]} constructorArguments - The arguments passed to the constructor of required files. * @returns {BaseManagedFile} */ private requireFile; }