/** * Base API. * @module */ export declare abstract class PlatformDirsABC { /** * The name of the application. */ appname: string | undefined; /** * The name of the app author or distributing body for this application. * * Typically it is the owning company name. Defaults to `appname`. You may pass `false` to disable it. */ appauthor: string | false | undefined; /** * An optional version path element to append to the path. * * You might want to use this if you want multiple versions of your app to be able to run independently. If used, this would typically be `.`. */ version: string | undefined; /** * Whether to use the roaming appdata directory on Windows. * * That means that for users on a Windows network setup for roaming profiles, this user data will be synced on login (see [here](https://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx)). */ roaming: boolean; /** * An optional parameter which indicates that the entire list of data dirs should be returned. * * By default, the first item would only be returned. */ multipath: boolean; /** * A flag to indicating to use opinionated values. */ opinion: boolean; /** * Optionally create the directory (and any missing parents) upon access if * it does not exist. * * By default, no directories are created. * * ⚠️ Since the getters (`dirs.userDataDir`, etc.) are synchronous, the * directory creation will use `fs.mkdirSync()` which **is a blocking * synchronous operation** to ensure that the returned path does indeed * exist before returning the path to the caller. This is for convenience. * If you require non-blocking async operation you should set this to * `false` and use `fs.mkdir()` or `fsPromises.mkdir()` yourself. */ ensureExists: boolean; /** * Create a new platform directory. */ constructor(appname?: string | undefined, appauthor?: string | false | undefined, version?: string | undefined, roaming?: boolean, multipath?: boolean, opinion?: boolean, ensureExists?: boolean); /** * @ignore @internal */ protected _appendAppNameAndVersion(...base: string[]): string; /** * @ignore @internal */ protected _optionallyCreateDirectory(dir: string): void; /** * @ignore @internal */ protected _firstItemAsPathIfMultipath(directory: string): string; /** * data directory tied to the user */ abstract get userDataDir(): string; /** * data directory shared by users */ abstract get siteDataDir(): string; /** * config directory tied to the user */ abstract get userConfigDir(): string; /** * config directory shared by users */ abstract get siteConfigDir(): string; /** * cache directory tied to the user */ abstract get userCacheDir(): string; /** * cache directory shared by users */ abstract get siteCacheDir(): string; /** * state directory tied to the user */ abstract get userStateDir(): string; /** * log directory tied to the user */ abstract get userLogDir(): string; /** * documents directory tied to the user */ abstract get userDocumentsDir(): string; /** * downloads directory tied to the user */ abstract get userDownloadsDir(): string; /** * pictures directory tied to the user */ abstract get userPicturesDir(): string; /** * videos directory tied to the user */ abstract get userVideosDir(): string; /** * music directory tied to the user */ abstract get userMusicDir(): string; /** * desktop directory tied to the user */ abstract get userDesktopDir(): string; /** * runtime directory tied to the user */ abstract get userRuntimeDir(): string; /** * runtime directory shared by users */ abstract get siteRuntimeDir(): string; /** * data path tied to the user */ get userDataPath(): string; /** * data path shared by users */ get siteDataPath(): string; /** * config path tied to the user */ get userConfigPath(): string; /** * config path shared by users */ get siteConfigPath(): string; /** * cache path tied to the user */ get userCachePath(): string; /** * cache path shared by users */ get siteCachePath(): string; /** * state path tied to the user */ get userStatePath(): string; /** * log path tied to the user */ get userLogPath(): string; /** * documents path tied to the user */ get userDocumentsPath(): string; /** * downloads path tied to the user */ get userDownloadsPath(): string; /** * pictures path tied to the user */ get userPicturesPath(): string; /** * videos path tied to the user */ get userVideosPath(): string; /** * music path tied to the user */ get userMusicPath(): string; /** * desktop path tied to the user */ get userDesktopPath(): string; /** * runtime path tied to the user */ get userRuntimePath(): string; /** * runtime path shared by users */ get siteRuntimePath(): string; /** * @yields all user and site configuration directories */ iterConfigDirs(): Generator; /** * @yields all user and site data directories */ iterDataDirs(): Generator; /** * @yields all user and site cache directories */ iterCacheDirs(): Generator; /** * @yields all user and site runtime directories */ iterRuntimeDirs(): Generator; /** * @yields all user and site state directories */ iterConfigPaths(): Generator; /** * @yields all user and site data directories */ iterDataPaths(): Generator; /** * @yields all user and site cache directories */ iterCachePaths(): Generator; /** * @yields all user and site runtime directories */ iterRuntimePaths(): Generator; }