From: Jack Jansen Date: Mon, 13 Feb 1995 11:31:51 +0000 (+0000) Subject: Added getfiletype routine X-Git-Tag: v1.2b3~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b3642579fd1f04d8ad6f4224ac36e5c821209aa0;p=thirdparty%2FPython%2Fcpython.git Added getfiletype routine --- diff --git a/Mac/Python/macsetfiletype.c b/Mac/Python/macsetfiletype.c index 328f02290db7..38b51ba33a5a 100644 --- a/Mac/Python/macsetfiletype.c +++ b/Mac/Python/macsetfiletype.c @@ -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; +} +