File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 92
92
*/
93
93
-(NSData *)loadData : (NSError **)error ;
94
94
95
+ /* *
96
+ Load the file's contents as a UTF8 string.
97
+
98
+ @param error If an error occurs, upon return contains an NSError object that describes the problem.
99
+
100
+ @return The file's complete contents as a UTF8 string.
101
+
102
+ @since 4.0
103
+ */
104
+ -(NSString *)loadString : (NSError **)error ;
105
+
95
106
/* *
96
107
Opens an input stream to the file so it can be read sequentially.
97
108
Original file line number Diff line number Diff line change @@ -507,6 +507,11 @@ -(NSData *)loadData:(NSError *__autoreleasing *)error
507
507
}
508
508
}
509
509
510
+ -(NSString *)loadString : (NSError **)error ;
511
+ {
512
+ return [[NSString alloc ] initWithData: [self loadData: error] encoding: NSUTF8StringEncoding];
513
+ }
514
+
510
515
-(CGImageSourceRef)createCGImageSource
511
516
{
512
517
if (_loadDataFromStream){
You can’t perform that action at this time.
0 commit comments