• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 10.2.0.83
GDFileHandle.h
Go to the documentation of this file.
1 /*
2  * (c) 2017 BlackBerry Limited. All rights reserved.
3  *
4  */
5 
6 #pragma once
7 
8 #import <Foundation/Foundation.h>
9 
10 NS_ASSUME_NONNULL_BEGIN
11 
252 @interface GDFileHandle : NSFileHandle
253 
254 - (NSData *)readDataToEndOfFile;
255 - (NSData *)readDataOfLength:(NSUInteger)length;
256 
257 - (void)writeData:(NSData *)data;
258 - (unsigned long long)seekToEndOfFile;
259 - (void)seekToFileOffset:(unsigned long long)offset;
260 - (void)truncateFileAtOffset:(unsigned long long)offset;
261 - (void)synchronizeFile;
262 - (void)closeFile;
263 
264 - (instancetype)initWithFileDescriptor:(int)fd closeOnDealloc:(BOOL)closeopt;
265 - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
266 
267 + (nullable instancetype)fileHandleForReadingAtPath:(NSString *)path;
268 + (nullable instancetype)fileHandleForWritingAtPath:(NSString *)path;
269 + (nullable instancetype)fileHandleForUpdatingAtPath:(NSString *)path;
270 
271 + (nullable instancetype)fileHandleForReadingFromURL:(NSURL *)url error:(NSError **)error;
272 + (nullable instancetype)fileHandleForWritingToURL:(NSURL *)url error:(NSError **)error;
273 + (nullable instancetype)fileHandleForUpdatingURL:(NSURL *)url error:(NSError **)error;
274 
275 @property (atomic, readonly, copy) NSData *availableData;
276 @property (atomic, readonly) unsigned long long offsetInFile;
277 @property (atomic, readonly) int fileDescriptor;
278 
279 // unavailable
280 + (NSFileHandle *)fileHandleWithStandardInput;
281 + (NSFileHandle *)fileHandleWithStandardOutput;
282 + (NSFileHandle *)fileHandleWithStandardError;
283 + (NSFileHandle *)fileHandleWithNullDevice;
284 - (void)readInBackgroundAndNotifyForModes:(nullable NSArray<NSString *> *)modes;
286 - (void)readToEndOfFileInBackgroundAndNotifyForModes:(nullable NSArray<NSString *> *)modes;
288 - (void)acceptConnectionInBackgroundAndNotifyForModes:(nullable NSArray<NSString *> *)modes;
290 - (void)waitForDataInBackgroundAndNotifyForModes:(nullable NSArray<NSString *> *)modes;
292 //
293 
294 @end
295 
296 NS_ASSUME_NONNULL_END
-[GDFileHandle readInBackgroundAndNotify]
void readInBackgroundAndNotify()
-[GDFileHandle waitForDataInBackgroundAndNotify]
void waitForDataInBackgroundAndNotify()
-[GDFileHandle acceptConnectionInBackgroundAndNotify]
void acceptConnectionInBackgroundAndNotify()
+[GDFileHandle fileHandleWithStandardInput]
NSFileHandle * fileHandleWithStandardInput()
GDFileHandle
File handle access to the secure file system.
Definition: GDFileHandle.h:252
GDFileHandle::fileDescriptor
int fileDescriptor
Definition: GDFileHandle.h:277
-[GDFileHandle seekToEndOfFile]
unsigned long long seekToEndOfFile()
+[GDFileHandle fileHandleWithNullDevice]
NSFileHandle * fileHandleWithNullDevice()
+[GDFileHandle fileHandleWithStandardOutput]
NSFileHandle * fileHandleWithStandardOutput()
+[GDFileHandle fileHandleWithStandardError]
NSFileHandle * fileHandleWithStandardError()
GDFileHandle::availableData
NSData * availableData
Definition: GDFileHandle.h:275
-[GDFileHandle synchronizeFile]
void synchronizeFile()
-[GDFileHandle closeFile]
void closeFile()
GDFileHandle::offsetInFile
unsigned long long offsetInFile
Definition: GDFileHandle.h:276
-[GDFileHandle readDataToEndOfFile]
NSData * readDataToEndOfFile()
-[GDFileHandle readToEndOfFileInBackgroundAndNotify]
void readToEndOfFileInBackgroundAndNotify()