Example #1
0
        void ParseSettingsFile(PList plist)
        {
            _autoRun = plist.Root.BoolValue(AUTORUN_KEY);
            var ignoredFiles = plist.Root.ArrayValue(IGNORE_KEY);

            if (ignoredFiles != null)
            {
                var files = ignoredFiles.ToStringArray();
                IgnoredFiles.SetIngnoredFiles(files);
            }

            IsDirty = false;
            var version = plist.Root.Element <PListInteger>(VERSION_KEY);

            if (version.IntValue != VERSION)
            {
                version.IntValue = VERSION;
                IsDirty          = true;
            }
        }
        public static bool IsValidFileOrFolder(string path)
        {
            if (string.IsNullOrEmpty(path))
            {
                return(false);
            }

            if (!Exists(path))
            {
                return(false);
            }

            //skip ignored types
            if (IgnoredFiles.ShouldIgnore(path))
            {
                return(false);
            }

            //Cannot ignore hidden files! Core Data models use them!
            return(true);
        }