fix(absolute pathing): add functions for easily getting absolute paths
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user