var express = require('express')
var router = express.Router()
var fs = require('fs')
var path = require('path')
var config = require('../bin/util/configUtil')
var pool = require('../bin/connection/mysqlConn')
var fsUtil = require('../bin/util/fsUtil')
const cloudService = require('../service/cloudService')

// 根目录
var baseDirector = config.Config.getInstance().baseFolder
// 获取目录树
router.get('/authFolder', function (req, res, next) {
    let userId = req.userId
    let opts = req.query
    cloudService.authFolder(opts, result => {
        res.json(result)
    })
})

// 创建文件夹
router.post('/createFolder', (req, res, next) => {
    let userId = req.userId
    cloudService.createFolder(userId, req.body, result => {
        res.json(result)
    })
})
/**
 * 删除文件夹
 * @param {String} baseFolder 当前操作的基目录
 * @param {String} delFolder 要删除的目录
 */
router.post('/deleteFolder', (req, res, next) => {
    let userId = req.userId
    cloudService.deleteFolder(userId, req.body, result => {
        res.json(result)
    })
})
/**
 * 重命名文件夹
 * @param {String} baseFolder 当前操作的基目录
 * @param {String} oldName 原文件夹名
 * @param {String} newName 新文件夹名
 */
router.post('/renameFolder', (req, res, next) => {
    let userId = req.userId
    cloudService.renameFolder(userId, req.body, result => {
        res.json(result)
    })
})
// 文件夹属性
router.post('/propertyFolder', (req, res, next) => {
    let userId = req.userId
    cloudService.propertyFolder(userId, opts, result => {
        res.json(result)
    })
})
/** --------------- 文件接口 ---------------- */
// 上传文件
router.post('/uploadFile', (req, res, next) => {
    let userId = req.userId
})
// 下载文件
router.post('/downloadFile', (req, res, next) => {

})
// 重命名文件
router.post('/renameFile', (req, res, next) => {
    let userId = req.userId
    cloudService.renameFile(userId, req.body, result => {
        res.json(result)
    })
})
// 删除文件
router.post('/deleteFile', (req, res, next) => {
    let userId = req.userId
    cloudService.deleteFile(userId, req.body, result => {
        res.json(result)
    })
})


module.exports = router
@@ -571,15 +571,114 @@
 )%0A%0A/
-/
+**%0A * %E5%88%9B%E5%BB%BA%E6%96%87%E4%BB%B6%E5%A4%B9%0A * %0A * @param %7BString%7D baseFolder %E5%BD%93%E5%89%8D%E6%93%8D%E4%BD%9C%E7%9B%AE%E5%BD%95%EF%BC%8C/%E8%AE%AF%E4%BC%A0%E7%BD%91%E7%BB%9C/a/b/c%0A * @param %7BString%7D newFolder
  %E5%88%9B%E5%BB%BA
+%E7%9A%84
 %E6%96%87%E4%BB%B6%E5%A4%B9
+%E5%90%8D%E7%A7%B0%0A */
 %0Arou

修改：添加创建文件夹参数注释