diff --git a/ts/smartfile.classes.smartfile.ts b/ts/smartfile.classes.smartfile.ts index ed90e53..7bb51f1 100644 --- a/ts/smartfile.classes.smartfile.ts +++ b/ts/smartfile.classes.smartfile.ts @@ -69,7 +69,7 @@ export class Smartfile extends plugins.smartjson.Smartjson { // INSTANCE // ======== /** - * the full path of the file on disk + * the relative path of the file */ @plugins.smartjson.foldDec() public path: string; @@ -116,6 +116,14 @@ export class Smartfile extends plugins.smartjson.Smartjson { this.base = optionsArg.base; } + public getAbsolutePath () { + return plugins.path.join(this.base, this.path); + } + + public getAbsoluteParsedPath() { + return plugins.path.parse(this.getAbsolutePath()); + } + /** * set contents from string * @param contentString