git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21954 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2005-11-05 07:12:00 +00:00
parent ffb1c7466d
commit 4ef387ccd5
2 changed files with 45 additions and 25 deletions

View file

@ -3469,13 +3469,43 @@ handle_printf_atsign (FILE *stream,
static NSFileManager *fm = nil;
#if defined(__MINGW32__)
- (const unichar*) fileSystemRepresentation
{
if (fm == nil)
{
fm = RETAIN([NSFileManager defaultManager]);
}
return [fm fileSystemRepresentationWithPath: self];
}
- (BOOL) getFileSystemRepresentation: (unichar*)buffer
maxLength: (unsigned int)size
{
const unichar *ptr = [self fileSystemRepresentation];
unsigned i;
for (i = 0; i < size; i++)
{
buffer[i] = ptr[i];
if (ptr[i] == 0)
{
break;
}
}
if (i == size && ptr[i] != 0)
{
return NO;
}
return YES;
}
#else
- (const char*) fileSystemRepresentation
{
if (fm == nil)
{
fm = RETAIN([NSFileManager defaultManager]);
}
return [fm fileSystemRepresentationWithPath: self];
}
@ -3488,6 +3518,7 @@ static NSFileManager *fm = nil;
strcpy(buffer, ptr);
return YES;
}
#endif
- (NSString*) lastPathComponent
{