mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Added getfiletype routine
This commit is contained in:
parent
7f7f274839
commit
b3642579fd
1 changed files with 13 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue