您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

25 行
445 B

  1. define([
  2. 'fs',
  3. 'path'
  4. ], function(
  5. fs,
  6. fsPath
  7. ) {
  8. return {
  9. getFolder: function(path) {
  10. return fs.readdirSync(path).filter(function(file) {
  11. return !fs.statSync(fsPath.join(path, file)).isDirectory();
  12. });
  13. },
  14. getFolderList: function(path) {
  15. try {
  16. return fs.readdirSync(path).filter(function(file) {
  17. return fs.statSync(fsPath.join(path, file)).isDirectory();
  18. });
  19. } catch (e) {
  20. return [];
  21. }
  22. }
  23. };
  24. });