HexFiend
|
HFByteArray methods for writing to files, and preparing other HFByteArrays for potentially destructive file writes.
Instance Methods | |
(BOOL) | - writeToFile:trackingProgress:error: |
(NSArray *) | - rangesOfFileModifiedIfSavedToFile: |
(BOOL) | - clearDependenciesOnRanges:inFile:hint: |
- (BOOL) writeToFile: | (NSURL *) | targetURL | |
trackingProgress: | (HFProgressTracker *) | progressTracker | |
error: | (NSError **) | error | |
Attempts to write the receiver to a file. This is a concrete method on HFByteArray.
targetURL | A URL to the file to be written to. It is OK for the receiver to contain one or more instances of HFByteSlice that are sourced from the file. |
progressTracker | An HFProgressTracker to allow progress reporting and cancelleation for the write operation. |
error | An out NSError parameter. |
Extends class HFByteArray.
- (NSArray *) rangesOfFileModifiedIfSavedToFile: | (HFFileReference *) | reference |
Returns the ranges of the file that would be modified, if the receiver were written to it. This is useful (for example) in determining if the clipboard can be preserved after a save operation. This is a concrete method on HFByteArray.
reference | An HFFileReference to the file to be modified |
Extends class HFByteArray.
- (BOOL) clearDependenciesOnRanges: | (NSArray *) | ranges | |
inFile: | (HFFileReference *) | reference | |
hint: | (NSMutableDictionary *) | hint | |
Attempts to modify the receiver so that it no longer depends on any of the HFRanges in the array within the given file. It is not necessary to perform this operation on the byte array that is being written to the file.
ranges | An array of HFRangeWrappers, representing ranges in the given file that the receiver should no longer depend on. |
reference | The HFFileReference that the receiver should no longer depend on. |
hint | A dictionary that can be used to improve the efficiency of the operation, by allowing multiple byte arrays to share the same state. If you plan to call this method on multiple byte arrays, pass the first one an empty NSMutableDictionary, and pass the same dictionary to subsequent calls. |
Extends class HFByteArray.