Make the Seafile Client parse .gitignore files on a per-directory basis

For now, the seafile-ignore.txt can only exclude with a positive rule. I’d like to suggest to add negative rules starting with an exclamation mark, e.g.:

!pictures/*.jpg

with the result that all files in the pictures folder that do not end with .jpg are excluded.
With this logic it should also be possible to create the file as a blacklist or a whitelist.
Imagine following:

# Do not exclude any picture
!*.jpg

# Do not exclude specific directory
!/mydir/importantData/*

# Exclude everything else (make this file kind of a 'whitelist')
*

The evaluation should start at the top and when a rule matches this rule should be applied to the file/folder. No more rules should be checked.