/// <summary>
        /// Converts <see cref="FeedsMetadata"/> to root directory.
        /// </summary>
        /// <param name="meta">The meta.</param>
        /// <param name="args">The arguments.</param>
        /// <returns></returns>
        /// <exception cref="DirectoryNotFoundException">The expected root directory is not here.</exception>
        public static string ToRootDirectory(this FeedsMetadata meta, ProgramArgs args)
        {
            var basePath = args.HasArg(ProgramArgs.BasePath, requiresValue: false) ? args.GetBasePathValue() : Directory.GetCurrentDirectory();

            var rootDirectory = meta.FeedsDirectory.StartsWith("./") ?
                                ProgramFileUtility.GetCombinedPath(basePath, meta.FeedsDirectory)
                :
                                meta.FeedsDirectory;

            rootDirectory = Path.GetFullPath(rootDirectory);

            if (!Directory.Exists(rootDirectory))
            {
                Directory.CreateDirectory(rootDirectory);
            }

            return(rootDirectory);
        }
        public void Start(ProgramArgs args)
        {
            var basePath = args.HasArg(ProgramArgs.BasePath, requiresValue: false) ? args.GetBasePathValue() : Directory.GetCurrentDirectory();

            this.SetMetadata();
            this.SetDataRoot(basePath);

            var container = this.GetContainerReference();
            var appJson   = this.DownloadAppFile(container);
            var jO        = JObject.Parse(appJson);

            this.WriteServerMeta(jO);

            this.DownloadFeedFiles(container);
            this.WriteFeedFiles(jO);

            this.WriteAppFile(jO);

            this.UploadAppFile(container);
        }