UNPKG

@w6s/sdk

Version:

WorkPlusFE JavaScript SDK.

27 lines (26 loc) 1.07 kB
"use strict"; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; Object.defineProperty(exports, "__esModule", { value: true }); var core = require("../core"); var constants_1 = require("../constants"); /** * 判断文件是否存在 * @description 判断指定路径的文件是否存在 * @param {FileExistOptions} [options] * @returns {Promise<FileExistRes>} */ function isFileExist(options) { var success = options.success, fail = options.fail, args = __rest(options, ["success", "fail"]); return core.exec(constants_1.WORKPLUS_FILE, 'isFileExist', [args], success, fail, false); } exports.default = isFileExist;