Skip to content
/ structr Public

Utility to generate custom file and directory hierarchies

License

Notifications You must be signed in to change notification settings

xasdx/structr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

structr

Build Status Coverage Status npm version

Utility that generates custom file and directory hierarchies

Install it

npm i node-structr -g

Use it

The script consumes a text-based hierarchy descriptor as its first argument, which contains the directories and files the user wishes to create. The second, optional argument might specify the target directory.

So the following command:

structr "$(< desc)" "$(pwd)"

will create the desired hierarchy at pwd:

Creating directory .../dir
Creating file .../dir/file.txt
Creating directory .../dir/dir
Creating file .../dir/dir/file.h
Creating directory .../another_dir
Creating directory .../another_dir/favDir
Creating file .../file.s

with desc being a descriptor file, containing the following text:

dir
 file.txt
 dir
  file.h
another_dir
 favDir
file.s

Note: nesting of files and folders is expressed by single space characters.

About

Utility to generate custom file and directory hierarchies

Resources

License

Stars

Watchers

Forks

Packages

No packages published