170
171
172
173
174
175
176
177
178
179
180
181
182
183
|
mode: mode] autorelease];
}
+ fileWithFileDescriptor: (int)fd_
{
return [[[self alloc] initWithFileDescriptor: fd_] autorelease];
}
+ (BOOL)fileExistsAtPath: (OFString*)path
{
struct stat s;
if (stat([path cString], &s) == -1)
return NO;
|
>
>
>
>
>
>
>
>
>
>
>
|
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
mode: mode] autorelease];
}
+ fileWithFileDescriptor: (int)fd_
{
return [[[self alloc] initWithFileDescriptor: fd_] autorelease];
}
+ (OFString*)currentDirectoryPath
{
char *buf = getcwd(NULL, 0);
@try {
return [OFString stringWithCString: buf];
} @finally {
free(buf);
}
}
+ (BOOL)fileExistsAtPath: (OFString*)path
{
struct stat s;
if (stat([path cString], &s) == -1)
return NO;
|