|
|
|
@ -2,19 +2,31 @@ package io.xtfs.jwebfs.web; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import io.xtfs.jwebfs.utils.AjaxResult; |
|
|
|
import io.xtfs.jwebfs.utils.FsUtils; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
@RestController |
|
|
|
@RequestMapping("/wbfs/v2") |
|
|
|
public class WbFsController { |
|
|
|
/** |
|
|
|
* 文件信息 |
|
|
|
* @param fspath |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@RequestMapping("/flist") |
|
|
|
public JSONObject flist(@RequestParam(value = "fspath",defaultValue = "/")String fspath){ |
|
|
|
if ("/".equals(fspath)) { |
|
|
|
|
|
|
|
fspath = System.getProperty("user.dir"); |
|
|
|
} |
|
|
|
// return AjaxResult.success("success",nlist,0);
|
|
|
|
return AjaxResult.success("ss"); |
|
|
|
List nlist = new ArrayList(); |
|
|
|
FsUtils.foldWalk(fspath,nlist); |
|
|
|
//
|
|
|
|
return AjaxResult.success("success",nlist,0); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|