Error when glob matches directory
See original GitHub issueCurrently it throws an error (EISDIR) when the glob matches a directory. I want to copy all files and directory structure to another directory. I am using cpy(['**/*'], '../output/dist', { cwd: 'assets', parents: true }, cb);
. This does not work since **/*
also matches the directory names.
I could make a PR to fix this if you know what behavior we should have. Should we just ignore empty directories or create them? I’m currently leaning toward creating any directories, which I think is the most intuitive.
Issue Analytics
- State:
- Created 9 years ago
- Comments:17 (4 by maintainers)
Top Results From Across the Web
Errors with Glob while outputting file names - Stack Overflow
Your first problem is that strings, including pathnames, need to be in quotes. This: files = glob.glob(/src/xyz/rte/folder/).
Read more >How to check if a glob has an expansion? [duplicate]
gz" files in a certain directory, I want to unzip them. But if there aren't, I don't want to see any error. If...
Read more >Understanding the glob pattern in Node.js - LogRocket Blog
The glob pattern is most commonly used to specify filenames, called wildcard characters, and strings, called wildcard matching. The glob pattern ...
Read more >glob - npm
If a file or directory path portion has a . as the first character, then it will not match any glob pattern unless...
Read more >glob - the Tcler's Wiki!
glob lists all the directory entries whose names match a given pattern, optionally filtering them by type. The following two cases are errors:....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
nodir
is not currently an option for CLIRelated issue: https://github.com/sindresorhus/cpy-cli/issues/10#issuecomment-370361001 => usage of glob
**/*.*
vs.**/*
, typically matches folder names (no filename extension)