AwbUpdater.Updater.CreatePath C# (CSharp) Method

CreatePath() private method

Creates all subdirectories in the path, if needed
private CreatePath ( string path ) : void
path string Path to process, assumed to start from
return void
        private void CreatePath(string path)
        {
            path = Path.GetDirectoryName(path); // strip filename
            if (path != null && !Directory.Exists(path))
            {
                UpdateUI("   Creating directory " + path + "...", true);
                try
                {
                    Directory.CreateDirectory(path);
                }
                catch (Exception ex)
                {
                    AppendLine("... FAILED");
                    UpdateUI("     (" + ex.Message + ")", true);
                }
            }
        }