nsresult Init(nsILocalFile* parent) { FSSpec fileSpec; fileSpec.vRefNum = 0; fileSpec.parID = 0;  nsCOMPtr<nsILocalFileMac> localFileMac = do_QueryInterface(parent); if (localFileMac) { localFileMac->GetResolvedFSSpec(&fileSpec); }   if (!fileSpec.vRefNum && !fileSpec.parID) { return NS_ERROR_FAILURE; }  mDir = My_OpenDir(&fileSpec); if (mDir == nsnull) return NS_ERROR_FAILURE;  mParent			 = parent; return NS_OK; }
nsresult Init(nsILocalFileMac* parent) { NS_ENSURE_ARG(parent); nsresult rv; FSSpec fileSpec;  rv = parent->GetFSSpec(&fileSpec); if (NS_FAILED(rv)) return rv;  OSErr err; Boolean isDirectory;  err = ::FSpGetDirectoryID(&fileSpec, &mDirID, &isDirectory); if (err || !isDirectory) return NS_ERROR_FILE_NOT_DIRECTORY;  mCatInfo.hFileInfo.ioNamePtr = mItemName; mCatInfo.hFileInfo.ioVRefNum = fileSpec.vRefNum; mItemIndex = 1;  return NS_OK; }
		nsresult Init(nsILocalFile* parent) 		{			FSSpec fileSpec;			fileSpec.vRefNum = 0;			fileSpec.parID = 0;						nsCOMPtr<nsILocalFileMac> localFileMac = do_QueryInterface(parent);			if (localFileMac) {				localFileMac->GetResolvedFSSpec(&fileSpec);			}						// See if we managed to get a FSSpec			if (!fileSpec.vRefNum && !fileSpec.parID)			{				return NS_ERROR_FAILURE;			}						mDir = My_OpenDir(&fileSpec);			if (mDir == nsnull)	   // not a directory?				return NS_ERROR_FAILURE;					mParent			 = parent;	  			return NS_OK;		}