public Dictionary <string, string> GetAttributes() { if (!_readFileAttrs) { Dictionary <string, string> cacheAttrs = GlobalFileAttributeCache.GetFileAttributes(_fname); if (cacheAttrs == null) { _readFileAttrs = true; int id = HDF4Helper.SDstart(_fname, HDF4Helper.AccessCodes.DFACC_READ); try { int dsCount = 0; int attCount = 0; HDF4Helper.SDfileinfo(id, out dsCount, out attCount); if (attCount == 0) { return(null); } _fileAttrs = GetAttributes(id, attCount); GlobalFileAttributeCache.SetFileAttributes(_fname, _fileAttrs); } finally { HDF4Helper.SDend(id); } } else { _fileAttrs = cacheAttrs; } } return(_fileAttrs); }