How to use the evt.getBasePath function in evt

To help you get started, we’ve selected a few evt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github leanote / desktop-app / node_modules / user.js View on Github external
setUserDataPath: function(userId) {
		var me = this;
		// 判断是否存在, 不存在则创建dir
		try {
			fs.mkdirSync(Evt.getBasePath() + '/data/');
		}
		catch(e) {};
		try {
			fs.mkdirSync(Evt.getBasePath() + '/data/' + this.getCurActiveUserId());
		} catch(e) {
		}
		try {
			fs.mkdirSync(Evt.getBasePath() + '/data/' + this.getCurActiveUserId() + '/images');
		} catch(e) {
		}
		try {
			fs.mkdirSync(Evt.getBasePath() + '/data/' + this.getCurActiveUserId() + '/attachs');
		} catch(e) {
		}
	},
github leanote / desktop-app / node_modules / user.js View on Github external
deleteUserImagesAndAttachsPath: function (userId) {
		var me = this;

		// 防止误删
		if (!Evt.getBasePath()) {
			return;
		}

		var imagesAndAttachBasePath = me.getUserImagesAndAttachBasePath(userId);
		if (imagesAndAttachBasePath) {
			Common.deleteFolderRecursive(imagesAndAttachBasePath);
		}
	},
github leanote / desktop-app / src / node_modules / user.js View on Github external
setUserDataPath: function(userId) {
		var me = this;
		// 判断是否存在, 不存在则创建dir
		try {
			fs.mkdirSync(Evt.getBasePath() + '/data/');
		}
		catch(e) {};
		try {
			fs.mkdirSync(Evt.getBasePath() + '/data/' + this.getCurActiveUserId());
		} catch(e) {
		}
		try {
			fs.mkdirSync(Evt.getBasePath() + '/data/' + this.getCurActiveUserId() + '/images');
		} catch(e) {
		}
		try {
			fs.mkdirSync(Evt.getBasePath() + '/data/' + this.getCurActiveUserId() + '/attachs');
		} catch(e) {
		}
	},
github leanote / desktop-app / node_modules / file.js View on Github external
addImage: function(path, callback) {
		var me = this;
		var absolutePath = Evt.getBasePath() + '/' + path;
		me._addImage(Common.objectId(), absolutePath, callback);
	},
github leanote / desktop-app / src / node_modules / file.js View on Github external
addImage: function(path, callback) {
		var me = this;
		var absolutePath = Evt.getBasePath() + '/' + path;
		me._addImage(Common.objectId(), absolutePath, callback);
	},
github leanote / desktop-app / node_modules / file.js View on Github external
addImage: function(path, callback) {
		var me = this;
		var absolutePath = Evt.getBasePath() + '/' + path;
		me._addImage(Common.objectId(), absolutePath, callback);
	},
github leanote / desktop-app / node_modules / db_client.js View on Github external
db.init = function (curUser, dbPath) {
    ipc.send('db-init', {
        curUser: curUser,
        dbPath: dbPath,
        dataBasePath: Evt.getBasePath()
    });
};