@@ -172,10 +172,21 @@ + 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;