Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: allow config, opposite to ignore #169

Closed
lu8aja opened this issue May 15, 2017 · 4 comments
Closed

Request: allow config, opposite to ignore #169

lu8aja opened this issue May 15, 2017 · 4 comments

Comments

@lu8aja
Copy link

lu8aja commented May 15, 2017

In certain cases you want to use ftp-sync to only upload certain specific files or extensions to the server.
It would be awesome, and I presume easy to implement, to have an allow config, which is the opposite of ignore.

If allow is nonempty, then essentially only those files that match any of the regexes at allow are uploaded. this does not disable ignore in any way, ignore would be processed normally just after allow

Right now, the only workaround is to add all the hundreths of things I want, to ignore, but in a dynamic project, that not only is cumbersome, but also risky, as new files get added all the time.

Thanks for such a great plugin.

lu8aja pushed a commit to lu8aja/vscode-ftp-sync that referenced this issue May 15, 2017
@lu8aja
Copy link
Author

lu8aja commented May 15, 2017

I have created a Pull Request for the feature: #170

hajekj added a commit that referenced this issue May 16, 2017
Feature #169: Implemented config allow
@ddur
Copy link

ddur commented May 17, 2017

Please, how to allow single directory and everything underneath

@lu8aja
Copy link
Author

lu8aja commented May 18, 2017

Then all you need to do is to have an array with just one regex for your allowed folder, like this

	"allow": [
		"myfolder/"
	],

Anything outside of myfolder will not match, and anything inside myfolder at any level, will match.
And to avoid the dreaded slashes syndrome, just make sure in Windows to use unix style slashes /
Otherwise you would have to double escape, and you would end with 4 \ for each \

@ddur
Copy link

ddur commented May 18, 2017

Thanks!

@NajSurf NajSurf closed this as completed Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants