CmisSync.Lib.Utils.WorthSyncing C# (CSharp) Method

WorthSyncing() public static method

Check whether the file is worth syncing or not. Files that are not worth syncing include temp files, locks, etc.
public static WorthSyncing ( string filename ) : System.Boolean
filename string
return System.Boolean
        public static Boolean WorthSyncing(string filename)
        {
            if (null == filename)
            {
                return false;
            }

            // TODO: Consider these ones as well:
            // "*~", // gedit and emacs
            // ".~lock.*", // LibreOffice
            // ".*.sw[a-z]", // vi(m)
            // "*(Autosaved).graffle", // Omnigraffle

            filename = filename.ToLower();

            if (ignoredFilenames.Contains(filename)
                || ignoredExtensions.Contains(Path.GetExtension(filename))
                || filename[0] == '~' // Microsoft Office temporary files start with ~
                || filename[0] == '.' && filename[1] == '_') // Mac OS X files starting with ._
            {
                Logger.Debug("Unworth syncing: " + filename);
                return false;
            }

            //Logger.Info("SynchronizedFolder | Worth syncing:" + filename);
            return true;
        }

Same methods

Utils::WorthSyncing ( string localDirectory, string filename, RepoInfo repoInfo ) : System.Boolean