summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1995-02-20 15:45:25 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1995-02-20 15:45:25 (GMT)
commit81f51c74ea488f17ba594836478c3f678d95f768 (patch)
treed46dc18c87071248fe7c4aac6fafc4769c12ad52 /Mac
parent6fc5aecd5363b22247898e021611b42ceee2a633 (diff)
downloadcpython-81f51c74ea488f17ba594836478c3f678d95f768.zip
cpython-81f51c74ea488f17ba594836478c3f678d95f768.tar.gz
cpython-81f51c74ea488f17ba594836478c3f678d95f768.tar.bz2
Added GetDirectory() method
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Modules/macfsmodule.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/Mac/Modules/macfsmodule.c b/Mac/Modules/macfsmodule.c
index bfdb15b..ae3c3b6 100644
--- a/Mac/Modules/macfsmodule.c
+++ b/Mac/Modules/macfsmodule.c
@@ -37,7 +37,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define FileFilterUPP FileFilterProcPtr
#endif
-
static object *ErrorObject;
/* ----------------------------------------------------- */
@@ -550,12 +549,28 @@ mfs_RawAlias(self, args)
return (object *)newmfsaobject((AliasHandle)h);
}
+static object *
+mfs_GetDirectory(self, args)
+ object *self; /* Not used */
+ object *args;
+{
+ FSSpec fsdir;
+ int ok;
+
+ if (!newgetargs(args, "") )
+ return NULL;
+
+ ok = PyMac_GetDirectory(&fsdir);
+ return mkvalue("(Oi)", newmfssobject(&fsdir), ok);
+}
+
/* List of methods defined in the module */
static struct methodlist mfs_methods[] = {
{"ResolveAliasFile", mfs_ResolveAliasFile, 1},
{"StandardGetFile", mfs_StandardGetFile, 1},
{"StandardPutFile", mfs_StandardPutFile, 1},
+ {"GetDirectory", mfs_GetDirectory, 1},
{"FSSpec", mfs_FSSpec, 1},
{"RawFSSpec", mfs_RawFSSpec, 1},
{"RawAlias", mfs_RawAlias, 1},