function readMarkdownPaths(filepath) {
  return new Promise((resolve, reject) => {
    try {
      let pathAll = [];
      const files = FS.readdirSync(filepath);
      for (let i = 0; i < files.length; i++) {
        if (/\.md$/.test(files[i])) {
          pathAll.push(path.join(filepath, files[i]));
        }
      }
      resolve(pathAll);
    } catch (err) {
      reject(err);
    }
  });
}
function readMarkdownPaths(filepath) {
  return new Promise((resolve, reject) => {
    try {
      let pathAll = [];
      const files = FS.readdirSync(filepath);
      for (let i = 0; i < files.length; i++) {
        if (/\.md$/.test(files[i])) {
          pathAll.push(path.join(filepath, files[i]));
        }
      }
      resolve(pathAll);
    } catch (err) {
      reject(err);
    }
  });
}
function readMarkdownPaths ( filepath ) { return new Promise ( ( resolve , reject ) => { try { let pathAll = [ ] ; const files = FS . readdirSync ( filepath ) ; for ( let i = 0 ; i < files . length ; i ++ ) { if ( / \.md$ / . test ( files [ i ] ) ) { pathAll . push ( path . join ( filepath , files [ i ] ) ) ; } } resolve ( pathAll ) ; } catch ( err ) { reject ( err ) ; } } ) ; }
返回 MD 所有路径的 Array
@param {String} filepath
返回 MD 所有路径的 Array
Read markdown files