QNDnsCacheFile.h 716 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // QNDnsCacheFile.h
  3. // QnDNS
  4. //
  5. // Created by yangsen on 2020/3/26.
  6. // Copyright © 2020 com.qiniu. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "QNRecorderDelegate.h"
  10. NS_ASSUME_NONNULL_BEGIN
  11. @interface QNDnsCacheFile : NSObject<QNRecorderDelegate>
  12. /// DNS解析信息本地缓存路径
  13. @property(nonatomic, copy, readonly)NSString *directory;
  14. /// 构造方法 路径不存在,或进行创建,创建失败返回为nil
  15. /// @param directory 路径
  16. /// @param error 构造错误时,会有值
  17. + (instancetype _Nullable)dnsCacheFile:(NSString *)directory
  18. error:(NSError **)error;
  19. - (void)clearCache:(NSError **)error;
  20. @end
  21. NS_ASSUME_NONNULL_END