mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21954 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ffb1c7466d
commit
4ef387ccd5
2 changed files with 45 additions and 25 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue