home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!ames!agate!mar
- From: mar@ocf.berkeley.edu (Michael A. Ramirez)
- Newsgroups: comp.sys.mac.programmer
- Subject: Creating and Using folders??
- Date: 27 Jul 1992 16:28:20 GMT
- Organization: U.C. Berkeley Open Computing Facility
- Lines: 26
- Distribution: world
- Message-ID: <151874INNj75@agate.berkeley.edu>
- NNTP-Posting-Host: earthquake.berkeley.edu
-
- Here is an easy question for some MAC programmer. I am trying to create a
- directory in my current working directory, and then set my working directory
- to that directory I just created. I have tried to use PBOpenWD, but to no
- avail. Here is what I have tried:
-
- GetVol(volName,&vRefNum)
- volInfo.ioVRefNum=vRefNum;
- volInfo.ioNamePtr=nil;
- volInfo.ioWDIndex=0;
- volInfo.ioWDProcID=0;
- volInfo.ioWDVRefNum=0;
- PBGetWDInfo(&volInfo,FALSE);
- volInfo.ioNamePtr=DIRECTORY_NAME;
- PBOpenWD(&volInfo,FALSE);
-
- Also I want to have the this also work if the directory is already present.
-
- Any help will be appreciated.
-
- Michael Ramirez
- mar@ocf.berkeley.edu
- --
- -----------------------------------------------------------------------------
- ___ _ ___ ___ _ ____ ____ ____ mar@ocf.berkeley.edu
- |__| |_| | | | | |___| |___ / When laws are outlawed then only
- | \ | | | | | | | \ |___ /___ outlaws will obey the law- Mondo 2000
-