summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1995-02-13 11:31:51 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1995-02-13 11:31:51 (GMT)
commitb3642579fd1f04d8ad6f4224ac36e5c821209aa0 (patch)
tree92ee7d631aa3f2313491710b3c1a993bb8d8629d /Mac
parent7f7f27483996ae9fcb2ed4fb0a3690280cda7b4a (diff)
downloadcpython-b3642579fd1f04d8ad6f4224ac36e5c821209aa0.zip
cpython-b3642579fd1f04d8ad6f4224ac36e5c821209aa0.tar.gz
cpython-b3642579fd1f04d8ad6f4224ac36e5c821209aa0.tar.bz2
Added getfiletype routine
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Python/macsetfiletype.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Mac/Python/macsetfiletype.c b/Mac/Python/macsetfiletype.c
index 328f022..38b51ba 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;
+}
+