PackageExplorerViewModel.PackageFile.Export C# (CSharp) Method

Export() public method

public Export ( string rootPath ) : void
rootPath string
return void
        public override void Export(string rootPath)
        {
            string fullPath = System.IO.Path.Combine(rootPath, Path);
            if (File.Exists(fullPath)) {
                bool confirmed = PackageViewModel.UIServices.Confirm(
                    String.Format(CultureInfo.CurrentCulture, Resources.ConfirmToReplaceFile, fullPath)
                );
                if (!confirmed) {
                    return;
                }
            }

            using (var stream = File.Create(fullPath)) {
                GetStream().CopyTo(stream);
            }
        }