include	clib.inc
include	dos.inc

PPROC	rmdir,  path:DPTR
  ifdef __LFN__
	mov	al,_ifsmgr
	test	al,al
  endif
	MPUSH	ds
	MLDS	dx,path
	mov	ah,3Ah
  ifdef __LFN__
	jz	rmdir_21
	stc
	xchg	al,ah
    rmdir_21:
  endif
	int	21h
	MPOP	ds
	jc	rmdir_err
	xor     ax,ax
    rmdir_end:
	ret
    rmdir_err:
	call	@dosmaper
	mov	ax,-1
	jmp	rmdir_end
PEND	rmdir

	END
