文件操作 - exception.ts
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/yaml-ast-parser/src/exception.ts
编辑文件内容
import Mark=require("./mark") 'use strict'; class YAMLException { message:string reason:string name:string mark:Mark isWarning:boolean private static CLASS_IDENTIFIER = "yaml-ast-parser.YAMLException"; public static isInstance(instance : any) : instance is YAMLException { if(instance != null && instance.getClassIdentifier && typeof(instance.getClassIdentifier) == "function"){ for (let currentIdentifier of instance.getClassIdentifier()){ if(currentIdentifier == YAMLException.CLASS_IDENTIFIER) return true; } } return false; } public getClassIdentifier() : string[] { var superIdentifiers = []; return superIdentifiers.concat(YAMLException.CLASS_IDENTIFIER); } constructor(reason:string, mark:Mark=null,isWarning=false) { this.name = 'YAMLException'; this.reason = reason; this.mark = mark; this.message = this.toString(false); this.isWarning = isWarning; } toString(compact:boolean=false){ var result; result = 'JS-YAML: ' + (this.reason || '(unknown reason)'); if (!compact && this.mark) { result += ' ' + this.mark.toString(); } return result; } } export=YAMLException
修改文件时间
将文件时间修改为当前时间的前一年
删除文件