Microsoft.R.Support.Help.Packages.PackageInfo.WriteToDisk C# (CSharp) Method

WriteToDisk() public method

public WriteToDisk ( ) : void
return void
        public void WriteToDisk() {
            if (!_saved) {
                var filePath = CacheFilePath;
                try {
                    var dir = Path.GetDirectoryName(filePath);
                    if (!Directory.Exists(dir)) {
                        Directory.CreateDirectory(dir);
                    }
                    using (var sw = new StreamWriter(filePath)) {
                        foreach (var f in _functions) {
                            sw.WriteLine(f.Name);
                        }
                    }
                    _saved = true;
                } catch (Exception ex) when (ex is IOException || ex is UnauthorizedAccessException) {
                    EditorShell.Current.Services.Log.WriteAsync(LogVerbosity.Normal, MessageCategory.Error, ex.Message).DoNotWait();
                }
            }
        }
        #endregion