AWSDDLogFileInfo
Objective-C
@interface AWSDDLogFileInfo : NSObject
Swift
class AWSDDLogFileInfo : NSObject
AWSDDLogFileInfo
is a simple class that provides access to various file attributes.
It provides good performance as it only fetches the information if requested,
and it caches the information to prevent duplicate fetches.
It was designed to provide quick snapshots of the current state of log files, and to help sort log files in an array.
This class does not monitor the files, or update it’s cached attribute values if the file changes on disk. This is not what the class was designed for.
If you absolutely must get updated values, you can invoke the reset method which will clear the cache.
-
Undocumented
Declaration
Objective-C
@property (strong, nonatomic, readonly) NSString *filePath
Swift
var filePath: String { get }
-
Undocumented
Declaration
Objective-C
@property (strong, nonatomic, readonly) NSString *fileName
Swift
var fileName: String { get }
-
Undocumented
Declaration
Objective-C
@property (strong, nonatomic, readonly) NSDictionary<NSFileAttributeKey, id> *fileAttributes
Swift
var fileAttributes: [FileAttributeKey : Any] { get }
-
Undocumented
Declaration
Objective-C
@property (strong, nonatomic, nullable, readonly) NSDate *creationDate
Swift
var creationDate: Date? { get }
-
Undocumented
Declaration
Objective-C
@property (strong, nonatomic, nullable, readonly) NSDate *modificationDate
Swift
var modificationDate: Date? { get }
-
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly) unsigned long long fileSize
Swift
var fileSize: UInt64 { get }
-
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly) NSTimeInterval age
Swift
var age: TimeInterval { get }
-
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly) BOOL isSymlink
Swift
var isSymlink: Bool { get }
-
Undocumented
Declaration
Objective-C
@property (nonatomic) BOOL isArchived
Swift
var isArchived: Bool { get set }
-
Undocumented
Declaration
Objective-C
+ (nullable instancetype)logFileWithPath:(nullable NSString *)filePath NS_SWIFT_UNAVAILABLE("Use init(filePath:)");
-
Unavailable
Undocumented
Declaration
Objective-C
- (instancetype)init NS_UNAVAILABLE;
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithFilePath:(NSString *)filePath NS_DESIGNATED_INITIALIZER;
Swift
init(filePath: String)
-
Undocumented
Declaration
Objective-C
- (void)reset;
Swift
func reset()
-
Undocumented
Declaration
Objective-C
- (void)renameFile:(NSString *)newFileName NS_SWIFT_NAME(renameFile(to:));
Swift
func renameFile(to newFileName: String)
-
Undocumented
Declaration
Objective-C
- (BOOL)hasExtendedAttributeWithName:(NSString *)attrName;
Swift
func hasExtendedAttribute(withName attrName: String) -> Bool
-
Undocumented
Declaration
Objective-C
- (void)addExtendedAttributeWithName:(NSString *)attrName;
Swift
func addExtendedAttribute(withName attrName: String)
-
Undocumented
Declaration
Objective-C
- (void)removeExtendedAttributeWithName:(NSString *)attrName;
Swift
func removeExtendedAttribute(withName attrName: String)
-
Undocumented
Declaration
Objective-C
- (NSComparisonResult)reverseCompareByCreationDate:(AWSDDLogFileInfo *)another;
Swift
func reverseCompare(byCreationDate another: AWSDDLogFileInfo) -> ComparisonResult
-
Undocumented
Declaration
Objective-C
- (NSComparisonResult)reverseCompareByModificationDate:(AWSDDLogFileInfo *)another;
Swift
func reverseCompare(byModificationDate another: AWSDDLogFileInfo) -> ComparisonResult