]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added getfiletype routine
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 13 Feb 1995 11:31:51 +0000 (11:31 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 13 Feb 1995 11:31:51 +0000 (11:31 +0000)
Mac/Python/macsetfiletype.c

index 328f02290db76382599cb2f0a87e4b2f7f57d03a..38b51ba33a5a0c5399ef39c9a5ea07c086b481d7 100644 (file)
@@ -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;
+}
+