osdFileGetAttributes

osdFileGetAttributes

osd

1998 12-05


NAME

osdFileGetAttributes - get attributes for specified file or directory


SYNOPSIS

long osdFileGetAttributes(char *filename,OSD_FileAttributes *attributes)

osdFileGetAttributes() queries the given filename for specific attributes and set the values in the structure attributes.


The OSD_FileAttributes structure is defined as:


typedef struct _OSD_FileAttributes
		{
		char string[20];
		long size;
		long attr;
		long access;
		} OSD_FileAttributes;


The string is similar, but identical to the first field in a UNIX 'ls -l' and is subject to change. The information portrayed in the string is completely redundant with the remaining data in the structure. The file size is in bytes. The attr is the OR'ed some of the following.



OSD_FILE_ATTR_NULL Not a directory or link.
OSD_FILE_ATTR_DIR Named file is actually a directory.
OSD_FILE_ATTR_LINK File is a link to another file. The existence of the pointed-to file is not verified.


The access is the OR'ed some of the following.



OSD_FILE_ATTR_NULL Not accessible.
OSD_FILE_ATTR_EXE The file can be executed.
OSD_FILE_ATTR_WRITE The file can be written to.
OSD_FILE_ATTR_READ The file can be read.


Returns a non-zero value if an error occurred.


ARGUMENTS


filename name of file or directory to query
attributes an OSD_FileAttributes structure to place the results