ObjFW  Diff

Differences From Artifact [1cd28fbc32]:

To Artifact [9c2025e097]:


321
322
323
324
325
326
327
328
329
330
331
332
333
334
335

	@try {
		src = [OFFile fileWithPath: from
				      mode: @"rb"];
		dest = [OFFile fileWithPath: to
				       mode: @"wb"];

		while (![src atEndOfStream]) {
			size_t len = [src readNBytes: 4096
					  intoBuffer: buf];
			[dest writeNBytes: len
			       fromBuffer: buf];
		}

#ifndef _WIN32







|







321
322
323
324
325
326
327
328
329
330
331
332
333
334
335

	@try {
		src = [OFFile fileWithPath: from
				      mode: @"rb"];
		dest = [OFFile fileWithPath: to
				       mode: @"wb"];

		while (![src isAtEndOfStream]) {
			size_t len = [src readNBytes: 4096
					  intoBuffer: buf];
			[dest writeNBytes: len
			       fromBuffer: buf];
		}

#ifndef _WIN32
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
	self = [super init];

	fd = fd_;

	return self;
}

- (BOOL)_atEndOfStream
{
	if (fd == -1)
		return YES;

	return eos;
}








|







453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
	self = [super init];

	fd = fd_;

	return self;
}

- (BOOL)_isAtEndOfStream
{
	if (fd == -1)
		return YES;

	return eos;
}