nsfilehandle Questions
3
Solved
my iPad app has a small download facility, for which I want to append the data using an NSFileHandle. The problem is the creation call only returns null file handles. What could be the problem? Her...
Pero asked 8/9, 2010 at 3:1
3
Solved
I am reading data from a NSFileHandle (from a NSPipe) using a readabilityHandler block:
fileHandle.readabilityHandler = ^( NSFileHandle *handle ) {
[self processData: [handle availableData]];
}
...
Authentic asked 6/4, 2013 at 13:12
11
Solved
I have a text file having data as given
e.g.
PUFGUjVRallYZDNaazFtVjVObU1zWm5ZcUJUYU5ORk4zbGthNHNDVUdSMlFVQmpSVEoxUUNSallYaFhkanBITXBGR1NTQnpZRTltZE1OalVzSkdXQ0Z6WXR0V2RpTmpTdXgwTWs5V1lZSkZiWjFXT...
Beutner asked 14/9, 2010 at 9:4
1
Solved
I have a Swift program that reads from FileHandle.standardInput (in Objective-C, this would be +[NSFileHandle fileHandleWithStandardInput]. It should terminate reading when it hits end-of-file on t...
Granular asked 3/3, 2017 at 2:2
2
I used NSFileHandle to writedata to a file.
NSFilehandle *handle = [NSFileHandle fileHandleForWritingAtPath:@"path/of/file"];
@try {
[handle writedata:data];
} @catch (NSException *e) {
// when...
Suellensuelo asked 23/5, 2014 at 8:56
1
Solved
I'm trying to use a Pipe's fileHandleForReading's readabilityHandler to read both the standardOutput and standardError of a Process. However, the moment the terminationHandler is called is actually...
Dropout asked 14/9, 2018 at 15:52
6
Solved
I want to store pictures taken from camera and video recordings from my application in a separate folder in temporary directories for a while. And as the task is being completed, they shall be goin...
Colophony asked 30/7, 2011 at 8:8
3
Solved
First of all, I am new to iOS and Swift and come from a background of Android/Java programming. So to me the idea of catching an exception from an attempt to write to a file is second nature, in ca...
Looksee asked 22/1, 2016 at 21:9
1
Solved
Using an NSFileHandle, it is pretty easy to remove n number of characters from the end of the file using truncateFileAtOffset.
-(void)removeCharacters:(int)numberOfCharacters fromEndOfFile:(NSFile...
Monoclinous asked 20/2, 2015 at 2:2
3
Solved
My application navigation based. UItextView for notes UIViewController. I am writing data for text to file. Now i need to write in append mode , the below code i am trying but every time is writing...
Harilda asked 24/1, 2011 at 8:12
2
Solved
I'm trying to find a file size.
NSFileHandle *output = [NSFileHandle fileHandleForWritingAtPath:self.finalPath];
//seek to begin of the file
[output seekToFileOffset:0];
NSData *mydata = [output...
Animality asked 28/2, 2012 at 9:58
1
Solved
This could be rather broad problem but I could not find any online resource addressing or explaining this matter.
The question is after creating NSFileHandle *writer = [NSFileHandle fileHandleForW...
Bonar asked 5/6, 2013 at 11:55
1
I'm attempting to read data from the Standard Error of a NSTask in Cocoa using waitForDataInBackgroundAndNotify. The following code does read the stream, so it's already working partially.
The pr...
Schock asked 8/4, 2013 at 19:17
1
I'm having a problem with EPIPE in my iOS app, and it's not being caught in the @try/@catch/@finally block. How can I catch this signal (SIGPIPE, likely)...
I've built a "web proxy" into my app t...
Alkali asked 15/1, 2013 at 21:29
3
First of all, when debugging and running in Xcode everything works as expected.
But when I try to "share" my app, i.e. make a release build, my NSTask won't output any standardOutput while standar...
Agraphia asked 24/11, 2011 at 9:22
1
Starting from OS X 10.7 and iOS 5.0 NSFileHandle has two new properties: readabilityHandler and writeabilityHandler. I tried to use writeabilityHandler, but no luck. The documentation is weird, it ...
Chippy asked 24/10, 2011 at 3:33
1
I am currently trying to wrap my head around the hole NSTask, NSPipe, NSFileHandle business. So I thought I write a little tool, which can compile and run C code. I also wanted to be able to redire...
Hypolimnion asked 14/6, 2011 at 22:5
1
Solved
I want to read the contents of an assets library file in iOS
NSFileHandle fileHandleForReadingFromUrl using the asset defaultRepresentation url seems to always return 0x0...
I'll keep looking for...
Staffard asked 3/5, 2011 at 22:41
1
Solved
I am trying to make a customized input stream based off of the one by Dave DeLong here that also allows for reading data from a server via NSURL. So far, I have this approach, which works fine for ...
Ridinger asked 12/10, 2010 at 14:28
2
Solved
Update 4
Per Greg's suggestion I've created one pair of image/text that shows the output from a 37k image to base64 encoded, using 100k chunks. Since the file is only 37k it's safe to say the loop ...
Andaman asked 4/10, 2010 at 21:55
1
© 2022 - 2024 — McMap. All rights reserved.