include	clib.inc
include	dos.inc

PPROC	filexist, filename:dword
	invoke	getfattr, filename
	inc	ax
	jz	filexist_end
	dec	ax      	; 1 = file
	and	ax,_A_SUBDIR    ; 2 = subdir
	shr	ax,4
	inc	ax
    filexist_end:
	ret
PEND	filexist

	END
