Added getfiletype routine
This commit is contained in:
parent
7f7f274839
commit
b3642579fd
|
@ -22,3 +22,16 @@ long creator, type;
|
|||
return SetFInfo(pname, 0, &info);
|
||||
}
|
||||
|
||||
long
|
||||
getfiletype(name)
|
||||
char *name;
|
||||
{
|
||||
FInfo info;
|
||||
unsigned char *pname;
|
||||
|
||||
pname = (StringPtr) Pstring(name);
|
||||
if ( GetFInfo(pname, 0, &info) < 0 )
|
||||
return -1;
|
||||
return info.fdType;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue