File Extensions
File Extensions
- Subject: File Extensions
- From: Patrick Tescher <email@hidden>
- Date: Tue, 07 May 2002 10:54:56 -0700
I am currently trying to make a browser for a High School that will only
open certain types of files. This is because the built in security in Mac OS
X is not enough to stop people from playing games and messing up the Macs.
Currently I am working off the Simple Browser example file, but I am very
new to cocoa programming and I don9t know exactly to go about it. So far I
have added a couple lines that looks like this (there is one of these for
all the allowed file types):
if ([[[NSFileManager defaultManager] displayNameAtPath: nodePath]
isEqualToString: @"doc"])
{
[[NSWorkspace sharedWorkspace] openFile: nodePath];
}
Everything above is based on the example files and/or the documentation. If
anyone knows a good way to limit the open command to only those files with
certain file extensions it would be very helpful. Thanks in advance,
~PatMan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.