UNPKG

cloudcms-cli

Version:
47 lines (43 loc) 1.37 kB
var helper = require("../../../helper"); var AbstractCommand = require("../../abstract"); class ls_command extends AbstractCommand { constructor() { super({ "group": "fs", "name": "ls", "description": "Lists the files in the given path", "schema": { "properties": [{ "name": "repositoryId", "type": "string", "description": "Enter the repository ID", "required": true, "args": ["repository", "r"] }, { "name": "branchId", "type": "string", "description": "Enter the branch ID", "required": true, "args": ["branch", "b"] }, { "name": "path", "type": "string", "description": "Enter the path", "required": false, "default": "/", "args": ["path", "p"] }] } }); } handle(options, callback) { // call workhorse function helper.fs_ls(options.repositoryId, options.branchId, options.path, function(err) { callback(err); }); } } module.exports = ls_command;