82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
{
Class c;
self = [super init];
if ((fp = fopen(path, mode)) == NULL) {
c = isa;
[super free];
@throw [OFOpenFileFailedException newWithClass: c
andPath: path
andMode: mode];
}
return self;
}
- free
{
if (fp != NULL)
fclose(fp);
return [super free];
}
- (BOOL)atEndOfFile
{
if (fp == NULL)
return YES;
|
|
|
|
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
{
Class c;
self = [super init];
if ((fp = fopen(path, mode)) == NULL) {
c = isa;
[super dealloc];
@throw [OFOpenFileFailedException newWithClass: c
andPath: path
andMode: mode];
}
return self;
}
- (void)dealloc
{
if (fp != NULL)
fclose(fp);
[super dealloc];
}
- (BOOL)atEndOfFile
{
if (fp == NULL)
return YES;
|