@skyrim-platform/jcontainers
Version:
TypeScript library for the JContainers Skyrim modding utility
45 lines (40 loc) • 2.22 kB
JavaScript
/*
==============================================
Typescript definitions for v4.2.1
==============================================
This file was automatically generated by Papyrus-2-Typescript.exe
https://github.com/CarlosLeyvaAyala/Papyrus-2-Typescript
The program has no way to know the intention of the humans that made
the scripts, so it's always advisable to manually check all generated
files to make sure everything is declared as it should.
Take note the program assumes this script exists in some subfolder
to the folder where `skyrimPlatform.ts` is found, otherwise you'll get
"Cannot find module..." type of errors.
If you want to have this script in some other place, just change the
relative path of each `import`.
*/
import * as sp from "skyrimPlatform";
/** Utility functionality */
var sn = sp.JContainers;
/** It's NOT part of public API */
export var __isInstalled = function () { return sn.__isInstalled(); };
/** Version information.
It's a good practice to validate installed JContainers version with the following code:
bool isJCValid = JContainers.APIVersion() == AV && JContainers.featureVersion() >= FV
where AV and FV are hardcoded API and feature version numbers.
Current API version is 4
Current feature version is 2 */
export var APIVersion = function () { return sn.APIVersion(); };
export var featureVersion = function () { return sn.featureVersion(); };
/** Returns true if the file at a specified @path exists */
export var fileExistsAtPath = function (path) { return sn.fileExistsAtPath(path); };
export var contentsOfDirectoryAtPath = function (directoryPath, extension) {
if (extension === void 0) { extension = ""; }
return sn.contentsOfDirectoryAtPath(directoryPath, extension);
};
/** Deletes the file or directory identified by the @path */
export var removeFileAtPath = function (path) { return sn.removeFileAtPath(path); };
/** A path to user-specific directory - My Games/Skyrim Special Edition/JCUser/ */
export var userDirectory = function () { return sn.userDirectory(); };
// Returns true if JContainers plugin installed properly
export var isInstalled = function () { return sn.isInstalled(); };