/*static char *SCCSID = "@(#)fs_rmdir.c	6.2 91/01/14";*/
#define SCCSID "@(#)fs_rmdir.c	6.2 91/01/14"
/*
 *	IBM/Microsoft Confidential
 *
 *	Copyright (c) IBM Corporation 1987, 1989
 *	Copyright (c) Microsoft Corporation 1987, 1989
 *
 *	All Rights Reserved
 *
 */

/***    FS_RMDIR - Remove a subdirectory
 *      
 *      Removes a subdirectory from the specified disk.
 *
 *
 *      THIS FUNCTION IS NOT SUPPORTED BY THE CD-ROM FSD.
 * 
 *
 *  REVISION HISTORY (in reverse chronological order)
 *  -------------------------------------------------------------------------
 *  4/27/90     Brian Andrew    Modified to simulate HPFS/FAT type response
 *                              when the disk would not need to be modified.
 *                              Return CDROM_WRITE_PROTECT otherwise.
 *
 *  9/13/89     Paul Bingman    First CDROM version
 *  8/4/89      Brian Andrew    Initial blank template
 *
 *
 * TO DO
 * --------------------------------------------------------------------------
 *
 */


#define INCL_DOSERRORS
#define INCL_NOPMAPI
#include <os2.h>
#include <fsd.h>

#include "cdfs.h"
#include "sem.h"
#include "path.h"
#include "vol.h"
#include "file.h"
#include "buffer.h"
#include "mem.h"
#include "heap.h"
#include "pr_memin.h"

#ifdef DEBUG
#include "pr_DEBUG.h"
#endif



int far pascal
FS_RMDIR (pcdfsi, pcdfsd, pName, iCurDirEnd)
PCDFSI      pcdfsi;
PCDFSD      pcdfsd;
PCHAR       pName;
USHORT      iCurDirEnd;
{
	USHORT  usRet;
	USHORT  afAttr;

#ifdef DEBUG
	dprintf ("FS_RMDIR(\"%Fs\")\n", pName);
#endif

	/*
	 *  Look for the file first by calling FS_FILEATTRIBUTE.  Pass any
	 *  error back as the return code.
	 */

	if (! (usRet = FS_FILEATTRIBUTE (
						FA_RETRIEVE,
						pcdfsi,
						pcdfsd,
						pName,
						iCurDirEnd,
						&afAttr)))
	{
		usRet = CDROM_WRITE_PROTECT;
	}

	return usRet;

	/* defeat compiler warnings */

	pcdfsi;
	pcdfsd;
	pName;
	iCurDirEnd;

}   /* end FS_RMDIR */

/* end of fs_rmdir.c */

