question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add ignore pattern in upload/downloadDir method.

See original GitHub issue

I 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:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
theophilusxcommented, May 28, 2020

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.

0reactions
theophilusxcommented, Apr 6, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found