1.9.16 • Published 13 days ago
fs-generate v1.9.16
fs-generate
Utilities to set up file system structures (directories, files, and symlinks).
Provide an object with forward slashes-delimited path keys describing the desired directory structure and it will be created for you.
It will not remove pre-exisiting directories, files, and symlinks so if you need this functionality, please submit a pull request!
Example
var path = require('path');
var generate = require('fs-generate');
var structure = {
'file1': 'a',
'file2': 'b',
'filesymlink1': '~dir3/dir4/file1', // symlink starts with ~
'dir1': null,
'dir2/file1': 'c',
'dir2/file2': 'd',
'dir3/filesymlink2': '~dir2/file1' // symlink starts with ~
'dir3/filelink2': ':dir2/file1', // link starts with :
'dir3/dir4/file1': 'e',
'dir3/dir4/dir5': null,
'dir3/dir4/dirsymlink1': '~dir2', // symlink starts with ~
};
generate(path.join(__dirname, 'dest'), structure, function(err) { /* done */ });
/*
- dest
- file1
- file2
- filesymlink1 (symlink to dir3/dir4/file1)
- dir1
- dir2
- file1
- file2
- dir3
- filesymlink1 (symlink to dir2/file1)
- filelink1 (link to dir2/file1)
- dir4
- file1
- dir5
- dirsymlink1 (symlink to dir2)
*/
1.9.16
13 days ago
1.9.15
13 days ago
1.9.14
13 days ago
1.9.13
13 days ago
1.9.12
22 days ago
1.9.11
22 days ago
1.9.10
22 days ago
1.9.9
24 days ago
1.9.8
24 days ago
1.9.1
1 month ago
1.9.0
1 month ago
1.9.7
1 month ago
1.8.8
1 month ago
1.9.6
1 month ago
1.8.7
2 months ago
1.9.5
1 month ago
1.9.4
1 month ago
1.9.3
1 month ago
1.9.2
1 month ago
1.8.6
12 months ago
1.8.5
3 years ago
1.8.4
5 years ago
1.8.3
5 years ago
1.8.2
5 years ago
1.8.1
5 years ago
1.8.0
5 years ago
1.7.0
5 years ago
1.6.0
5 years ago
1.5.0
5 years ago
1.4.0
5 years ago
1.3.0
6 years ago
1.2.0
6 years ago
1.1.0
7 years ago
1.0.0
9 years ago