Add ignore pattern in upload/downloadDir method.
See original GitHub issueI want ignore some files when using uploadDir
and downloadDir
method.
e.g.:
client.uploadDir(buildLocal, buildRemote, '.git/**'); // ignore files in .git directory
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Exclude files and folders from uploading and downloading
Exclude files and folders from upload/download by name · Open the Options dialog by doing one of the following: From the main menu,...
Read more >Ignoring files - GitHub Docs
Configuring ignored files for a single repository. You can create a .gitignore file in your repository's root directory to tell Git which files...
Read more >A guide on how to set a custom ignore file for Polyaxon CLI
Every time an upload command is invoked it will invoke the ignore manager to check the defined patterns to ignore while traversing the...
Read more >How to Use a .gitignore File - Pluralsight
A . gitignore file is a plain text file where each line contains a pattern for files/directories to ignore. Generally, this is placed...
Read more >How to ignore files from your npm package | Zell Liew
A second way is to blacklist files with a .npmignore file. The .npmignore file works the same way as a .gitignore file. If...
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 FreeTop 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
Top GitHub Comments
That seems like a reasonable requirement. It isn’t possible at present, but happy to take it on board as a feature enhancement. Will look at implementation when I get time. Pull requests are welcome.
I’m not sure I understand exactly what you are trying to do (maybe a language issue?). The filter is used to exclude things it matches. Your filter matches the files in idls, so there are no files to download from that directory. The filter is not just applied to the root directory. It is applied to all the entries in every directory (downloadDir recurses into all sub-directories). It looks like idls was ignored because all the files in that directory match your filter, so no files were downloaded from that directory.
What version of ssh2-sftp-cleint are you using? What version of node are you using? What platform is the client running on?
The filter is a regular expression - it can be as sophisticated or as simple as you want. Your filter is very simple and it is matching all files or directories with ‘.thrift’ in the name. If you want some files with thrift in the name, you need to refine your regexp filter.