Again: NSFileWrapper (sorry)
Again: NSFileWrapper (sorry)
- Subject: Again: NSFileWrapper (sorry)
- From: Nick Müller <email@hidden>
- Date: Thu, 10 Jan 2002 20:39:42 +0100
Hi,
I thought I solved it. But there is still something (a bug?) left.
The code snipplet...:
// ----
NSFileWrapper *file = [[NSFileWrapper alloc]
initWithRegularFileContents:nil];
[attributes setObject: [NSNumber numberWithUnsignedInt: 'FooB']
forKey:NSFileHFSCreatorCode];
[attributes setObject: NSFileTypeRegular forKey:NSFileType];
[attributes setObject: [NSNumber numberWithUnsignedInt:0777]
forKey:NSFilePosixPermission];
[file setFileAttributes: attributes];
[file writeToFile:@"file.ext" atomicaly:NO updateFilenames:YES];
// ----
... should create an empty file and set the creator to 'FooB' on a
HFS-disk.
It creates the file but doesn't set the creator. If I check the file
with FileTyper (OS 9) the creator is left blank. Setting the creator
with FileTyper has exactly the results expected on the OS X.
There is a bug, just tell me where and who's gotta fix it.
Thanks,
Nick
.........................................
logic tools
WebObjects // Web Authoring // Perl
Nick Mueller // Muenchen // Germany