[opencms-dev] Folder Synchronization Exclusion lists?

Nikolas Lotz nlotz at nde.ag
Wed Apr 22 10:50:24 CEST 2009


I just wrote my own version of 'CmsSynchronize.java' with
a method that checks for resources to be omitted from sync:

--- snip: CmsSynchronizeExtended.copyFromRfs(...) ------------

        // now loop through all resources
        for (int i = 0; i < res.length; i++) {

[+]         if(omitResource(res[i].getName()))
[+]             continue;

            [...]
        }

--- snap ------------------------------------------------------

--- snip: CmsSynchronizeExtended.omitResource(...) ------------

[+]     public boolean omitResource(String name) {
[+]
[+]         if(name.equals("CVS"))      // CVS metadata
[+]             return true;
[+]
[+]         if(name.startsWith("."))    // .svn, .something
[+]             return true;
[+]
[+]         if(name.endsWith(".swp"))   // VI swap files
[+]             return true;
[+]
[+]         return false;
[+]     }

--- snap -------------------------------------------------------

-- 
Nikolas Lotz                            voice   : +49-40-559 51 75
NDE Netzdesign und -entwicklung AG      fax     : +49-40-559 51 77
Postfach 61 03 15                       mobile  : +49-163-758-6751
D-22423 Hamburg                         e-mail  : nlotz at nde.ag

        Vorsitzende des Aufsichtsrates: Angelika Mozdzen
          Sitz und Registergericht: Hamburg, HRB 90934
                  Vorstand: Jens-U. Mozdzen
                   USt-IdNr. DE 814 013 983



More information about the opencms-dev mailing list