mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-02 21:01:07 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32187 72102866-910b-0410-8b05-ffd578937521
40 lines
920 B
Objective-C
40 lines
920 B
Objective-C
/*
|
|
copyright 2004 Alexander Malmberg <alexander@malmberg.org>
|
|
*/
|
|
|
|
#import "Testing.h"
|
|
#import <Foundation/NSArray.h>
|
|
#import <Foundation/NSString.h>
|
|
#import <Foundation/NSAutoreleasePool.h>
|
|
#import <Foundation/NSFileManager.h>
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
|
NSFileManager *fm=[NSFileManager defaultManager];
|
|
NSArray *files;
|
|
int i;
|
|
BOOL e,d;
|
|
|
|
files=[fm directoryContentsAtPath: @"."];
|
|
printf("%i files\n",[files count]);
|
|
for (i=0;i<[files count];i++)
|
|
{
|
|
int j;
|
|
NSString *f=[files objectAtIndex: i];
|
|
e=[fm fileExistsAtPath: f
|
|
isDirectory: &d];
|
|
printf("%5i: %i %i %s\n",i,e,d, [f lossyCString]);
|
|
for (j=0;j<[f length];j++)
|
|
printf(" %3i: %04x\n",j,[f characterAtIndex: j]);
|
|
}
|
|
|
|
/* const char *test="hallÄ.txt";
|
|
NSString *s=[NSString stringWithCString: test];
|
|
printf("s=%s\n", [s lossyCString]);*/
|
|
|
|
[arp release]; arp = nil;
|
|
|
|
return 0;
|
|
}
|
|
|