Esempio n. 1
0
        public Helper(File file)
        {
            File    = file;
            IsUser  = file.Path.StartsWith(HelperService.UserDir.Path);
            enabled = prefs.Get <bool> (prefs.SanitizeKey(File.Basename), false);

            GLib.File DataFile;
            if (IsUser)
            {
                DataFile = HelperService.UserMetaDir;
            }
            else if (file.Path.StartsWith(HelperService.SysDir.Path))
            {
                DataFile = HelperService.SysMetaDir;
            }
            else
            {
                DataFile = HelperService.SysLocalMetaDir;
            }

            DataFile = DataFile.GetChild(File.Basename + ".info");

            if (DataFile.Exists)
            {
                Data = new HelperMetadata(DataFile);
            }

            if (Enabled)
            {
                Start();
            }
        }