Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parse-directorys

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-directorys

parse directorys to an object

  • 1.1.2
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

parse-directorys

把目录结构解析成一个目录树对象

Usage

npm install parse-directorys --save

...

var parser = require("parse-directorys");

parser(".....");

最终返回的结构类型

name        目录名
type        类型(file/folder)
fullPath    全路径
parent      父级目录路径
files       当前目录下所有文件
            parent      父级目录路径
            fullPath    全路径
            name        文件名
            size        文件大小(kb)
            extName     文件结构
            mimeType    mime类型
folders     当前目录下所有目录(结构同上)
            name        目录名
            type        类型(file/folder)
            fullPath    全路径
            parent      父级目录路径
            files       当前目录下所有文件
                        parent      父级目录路径
                        fullPath    全路径
                        name        文件名
                        size        文件大小(kb)
                        extName     文件结构
                        mimeType    mime类型
            folders      当前目录下所有目录(结构同上)
测试
git clone https://github.com/rwson/parse-directorys.git

cd parse-directorys

//	修改server.js里面"/Users/Mrson/My/Projects/Uquiz/uquiz-ng4/src"到自己机器的任意路径

node server.js

访问http://localhost:3000查看结果

FAQs

Package last updated on 09 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc