-
Notifications
You must be signed in to change notification settings - Fork 63
Ignore settings option described
Ignore option (see all settings) makes FTPSync skip certain files that you want fully excluded from all processes.
There are two ignores:
Located in global settings file:
Preferences > Package Settings > FTPSync > Settings - default
Preferences > Package Settings > FTPSync > Settings - user
This is used first and applies to every single project managed by FTPSync. The default value is ignoring all the ftpsync.settings files.
Is specified in ftpsync.settings file and is applied only to files affected by this settings (which ones?).
The value of ignore is a string, that will be treated like regular expression. This regular expression is used against full file path. Then it is aslo OS specific, meaning you need to take into account different slashes for Windows and Unix (Windows accepts forward slashes, but this is a different case).
One thing you need to do when using backslashes is quadrupling. This is because backslash is special character, that in regular string makes the following character have special effect. For example \t
is a tab, \n
is newline etc. But we need to type backslash somehow, for that you use \\
.
However - in regular expressions backslashes are also special characters, that make the following character NOT to have a special effect. And again - to make a backslash you use \\
.
If you want \ to be present in regular expression:
use \\\\
then because it's string it's actually \\
and because it's regular expression it's actually just \
If you want \ to be used for escaping in regular expression:
use \\ then because it's string it's actually
` and because it's regular expression it's used for escaping
-
If you want to ignore folder and all below:
Unix:/somefolder/
Windows:\\\\somefolder\\\\
-
If you want to exclude certain file type:
\\.cache
-
If you want to exclude file based on partial file name:
abc.*?\\.txt
product\\.(list|info).\\d+\\.cache
-
Exclude certain file types, but only below certain folder:
Unix:/log/.*?\\.html
Windows:\\\\log\\\\.*?\\.html
-
Multiple ignores separate by "|":
/somefolder/|/log/.*?\\.html|\\.txt|\\.cache