FROM : Nick Müller
DATE : Thu Jan 10 20:39:42 2002
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
DATE : Thu Jan 10 20:39:42 2002
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
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

