import { ChacaUtils } from "../../core/utils"; import { WordModule } from "../word"; import { DatatypeModule } from "../datatype"; export interface CronProps { includeYear?: boolean; includeNonStandard?: boolean; } export declare type FilenameProps = { ext?: string; }; export declare class SystemModule { private readonly utils; private readonly datatypeModule; private readonly wordModule; constructor(utils: ChacaUtils, datatypeModule: DatatypeModule, wordModule: WordModule); readonly constants: { fileExtensions: { text: string[]; code: string[]; config: string[]; docs: string[]; multimedia: string[]; minify: string[]; executable: string[]; database: string[]; office: string[]; videogame: string[]; os: string[]; }; mimeTypes: string[]; }; /** * Returns a file name * @param args.ext File extension * @example * modules.system.filename() // 'academy.png' * modules.system.filename({ ext: 'gif' }) // 'academy_button_school.gif' * @returns string */ filename({ ext: iext }?: FilenameProps): string; /** * Returns a mime type * @example modules.system.mimeType() // 'video/mpeg' * @returns string */ mimeType(): string; /** * Return a file extension * @example modules.system.fileExt() // 'mp4' * @returns string */ fileExt(): string; /** * Returns a directory path * * @example modules.system.directoryPath() // 'user/files/videos' * * @returns string */ directoryPath(): string; /** * Returns a string with a system file path * @example * modules.system.filePath() // 'user/files/videos/academy.mp4' * @returns string */ filePath(): string; /** * Returns a [semantic version](https://semver.org). * * @example * modules.system.semver() // '1.1.2' */ semver(): string; /** * Returns a random cron expression. * * @param args.includeYear Whether to include a year in the generated expression. Default `false`. * @param args.includeNonStandard Whether to include a `@yearly`, `@monthly`, `@daily`, etc text labels in the generated expression. Default`false`. * * @example * modules.system.cron() // '45 23 * * 6' * modules.system.cron({ includeYear: true }) // '45 23 * * 6 2067' * modules.system.cron({ includeYear: false }) // '45 23 * * 6' * modules.system.cron({ includeNonStandard: false }) // '45 23 * * 6' * modules.system.cron({ includeNonStandard: true }) // '@yearly' */ cron({ includeYear, includeNonStandard, }?: CronProps): string; }