file attributes

DOS specific questions.
Post Reply
nedman47
Posts: 62
Joined: Dec 05, 2006 15:35

file attributes

Post by nedman47 »

I am trying to use the DJGPP function _dos_getfileattr to tell me if a file is marked as read only but all I get back is zero.

Code: Select all

#include "dos/dos.bi"
dim as uinteger ptr fa
_dos_getfileattr("z.z",fa)
print *fa
vdecampo
Posts: 2992
Joined: Aug 07, 2007 23:20
Location: Maryland, USA
Contact:

Re: file attributes

Post by vdecampo »

nedman47 wrote:I am trying to use the DJGPP function _dos_getfileattr to tell me if a file is marked as read only but all I get back is zero.

Code: Select all

#include "dos/dos.bi"
dim as uinteger ptr fa
_dos_getfileattr("z.z",fa)
print *fa
Maybe it needs to be like this?

Code: Select all

#include "dos/dos.bi"
dim as uinteger fa
_dos_getfileattr("z.z",@fa)
print fa
-Vince
DOS386
Posts: 798
Joined: Jul 02, 2005 20:55

Re: file attributes

Post by DOS386 »

nedman47 wrote:I am trying to use the DJGPP function _dos_getfileattr to tell me if a file is marked as read only but all I get back is zero.
IIRC FB's DIR also allows this and worked well for me.
Post Reply