{% extends "help/base.html" %}
{% load i18n %}

{% block help_con %}

<h3 class="hd">{% trans "Excluding files/folders from syncing" %}</h3>

<p>{% trans "Sometimes you don't want to sync some files or folders inside a library. To achieve this, create a seafile-ignore.txt file in the root folder of a library. This special file specifies the files and folders that Seafile should not sync. Each line in a ignore.txt file specifies a pattern. The following pattern format are supported." %}
<ol>
    <li>{% trans "A blank line matches no files." %}</li>
    <li>{% trans "A line starting with # serves as a comment." %}</li>
    <li>{% blocktrans %}Seafile supports wildcards in the pattern. For example, "foo/*" matches "foo/1" and "foo/hello". "foo/?" matches "foo/1" but not "foo/hello". Note that the wildcard character * recursively matches all the paths under a folder. For instance, "foo/*.html" matches "foo/a.html" and "foo/templates/b.html".{% endblocktrans %}</li>
    <li>{% blocktrans %}If the pattern ends with a slash, it would only match a folder. In other words, "foo/" will match a folder "foo" and paths underneath it, but will not match a regular file or a symbolic link "foo".{% endblocktrans %}</li>
    <li>{% blocktrans %}If a pattern doesn't end with a slash or a wildcard, it would not match a folder. For example, "foo" can only match regular file "foo" or a symbolic link; while "foo/" and "foo*" match a folder and paths under it.{% endblocktrans %}</li>
</ol>
</p>

<h4>{% trans "Example" %}</h4>

<pre>
# a regular file
test-file

# a dir
test-dir/

# wildcard *
test-star1/*
test-star2/*.html

# wildcard ?
test-qu1/?.html
test-qu2/?/
</pre>

<h4>{% trans "Notes" %}</h4>

<p>{% trans "The seafile-ignore.txt file only controls which files to exclude on the client side. You can still create a file from seahub web interface that's excluded on the client. In this case," %}
<ul>
    <li>{% trans "The created file will still be synced back to clients. But any later local changes to those files will be ignored." %}</li>
    <li>{% trans "If the file is modified on seahub, the new version will also be synced back to clients; If the file on the client is also modified, a conflict file will be generated on the client." %}</li>
</ul>
</p>

<p>{% trans "seafile-ignore.txt only ignores files that are not synced yet. If a file is already synced, and some time later you add it to the ignore list, its existing versions won't be removed." %}</p>
{% endblock %}
