_A_RDONLY
Is an attriube that should mark the folder as read only. It is part of the WIN32_FIND_DATA or _finddata_t structure and is one of the attribue flags if you set the flag that should mark the file as read only. I suggest doing a search on msdn.com. Hopefully that will help you. The following is some code from msdn.com. It only demonstrates a little about the data structure but i think you will see you are looking to fiugre out exactly how that structure works.
/* FFIND.C: This program uses the 32-bit _find functions to print
* a list of all files (and their attributes) with a .C extension
* in the current directory.
*/
#include <stdio.h>
#include <io.h>
#include <time.h>
void main( void )
{
struct _finddata_t c_file;
long hFile;
/* Find first .c file in current directory */
if( (hFile = _findfirst( "*.c", &c_file )) == -1L )
printf( "No *.c files in current directory!\n" );
else
{
printf( "Listing of .c files\n\n" );
printf( "\nRDO HID SYS ARC FILE DATE %25c SIZE\n", ' ' );
printf( "--- --- --- --- ---- ---- %25c ----\n", ' ' );
printf( ( c_file.attrib & _A_RDONLY ) ? " Y " : " N " );
printf( ( c_file.attrib & _A_SYSTEM ) ? " Y " : " N " );
printf( ( c_file.attrib & _A_HIDDEN ) ? " Y " : " N " );
printf( ( c_file.attrib & _A_ARCH ) ? " Y " : " N " );
printf( " %-12s %.24s %9ld\n",
c_file.name, ctime( &( c_file.time_write ) ), c_file.size );
/* Find the rest of the .c files */
while( _findnext( hFile, &c_file ) == 0 )
{
printf( ( c_file.attrib & _A_RDONLY ) ? " Y " : " N " );
printf( ( c_file.attrib & _A_SYSTEM ) ? " Y " : " N " );
printf( ( c_file.attrib & _A_HIDDEN ) ? " Y " : " N " );
printf( ( c_file.attrib & _A_ARCH ) ? " Y " : " N " );
printf( " %-12s %.24s %9ld\n",
c_file.name, ctime( &( c_file.time_write ) ), c_file.size );
}
_findclose( hFile );
}
}
Output
Listing of .c files
RDO HID SYS ARC FILE DATE SIZE
--- --- --- --- ---- ---- ----
N N N Y CWAIT.C Tue Jun 01 04:07:26 1993 1611
N N N Y SPRINTF.C Thu May 27 04:59:18 1993 617
N N N Y CABS.C Thu May 27 04:58:46 1993 359
N N N Y BEGTHRD.C Tue Jun 01 04:00:48 1993 3726