Sharathms
June 13th, 2001, 09:23 AM
Hi,
can somebody give an equivalent API/ vb Function for the 'C' Access function , where in we can check access (read / write) to a file.
Thanks,
Sharath
//code from msdn
#include <io.h>
#include <stdio.h>
#include <stdlib.h>
void main( void )
{
/* Check for existence */
if( (_access( "ACCESS.C", 0 )) != -1 )
{
printf( "File ACCESS.C exists\n" );
/* Check for write permission */
if( (_access( "ACCESS.C", 2 )) != -1 )
printf( "File ACCESS.C has write permission\n" );
}
}
can somebody give an equivalent API/ vb Function for the 'C' Access function , where in we can check access (read / write) to a file.
Thanks,
Sharath
//code from msdn
#include <io.h>
#include <stdio.h>
#include <stdlib.h>
void main( void )
{
/* Check for existence */
if( (_access( "ACCESS.C", 0 )) != -1 )
{
printf( "File ACCESS.C exists\n" );
/* Check for write permission */
if( (_access( "ACCESS.C", 2 )) != -1 )
printf( "File ACCESS.C has write permission\n" );
}
}