From 81f51c74ea488f17ba594836478c3f678d95f768 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 20 Feb 1995 15:45:25 +0000 Subject: Added GetDirectory() method --- Mac/Modules/macfsmodule.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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}, -- cgit v0.12