Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

25 lignes
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. });