コード例 #1
0
        public static bool IsHistoric(string directoryPath)
        {
            if (!PollUtils.IsFileExists(PollUtils.PathCombine(directoryPath, VersionFileName)))
            {
                return(true);
            }

            PollUtils.DeleteFileIfExists(PollUtils.PathCombine(directoryPath, VersionFileName));

            return(false);
        }
コード例 #2
0
ファイル: TemplateManager.cs プロジェクト: siteserver/SS.Poll
        private static TemplateInfo GetTemplateInfo(string templatesDirectoryPath, string name)
        {
            TemplateInfo templateInfo = null;

            var configPath = PollUtils.PathCombine(templatesDirectoryPath, name, "config.json");

            if (PollUtils.IsFileExists(configPath))
            {
                templateInfo      = Context.UtilsApi.JsonDeserialize <TemplateInfo>(PollUtils.ReadText(configPath));
                templateInfo.Name = name;
            }

            return(templateInfo);
        }