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

TryRestoreFromCache() private method

Attempts to locate cached function list for the package
private TryRestoreFromCache ( ) : IEnumerable
return IEnumerable
        private IEnumerable<string> TryRestoreFromCache() {
            var filePath = this.CacheFilePath;
            try {
                if (File.Exists(filePath)) {
                    var list = new List<string>();
                    using (var sr = new StreamReader(filePath)) {
                        while (!sr.EndOfStream) {
                            list.Add(sr.ReadLine().Trim());
                        }
                    }
                    return list;
                }
            } catch (IOException) { } catch (UnauthorizedAccessException) { }

            return null;
        }