#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
void main( void )
{
struct _stat buf;
int result;
char buffer[] = "A line to output";
/* Get data associated with "stat.c": */
result = _stat( "D:\\Program Files\\China Mobile\\Fetion\\Fetion.exe", &buf );//我想要获得飞信的一些信息
/* Check if statistics are valid: */
if( result != 0 )
perror( "Problem getting information" );
else
{
/* Output some of the statistics: */
printf( "File size : %ld\n", buf.st_size );//文件大小
printf( "Drive : %c:\n", buf.st_dev + 'A' );//所在盘符
printf( "Time modified : %s\n", ctime( &buf.st_atime ) );//文件修改时间
printf( "Program info : %d", &buf.st_ino );
}
}
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
void main( void )
{
struct _stat buf;
int result;
char buffer[] = "A line to output";
/* Get data associated with "stat.c": */
result = _stat( "D:\\Program Files\\China Mobile\\Fetion\\Fetion.exe", &buf );//我想要获得飞信的一些信息
/* Check if statistics are valid: */
if( result != 0 )
perror( "Problem getting information" );
else
{
/* Output some of the statistics: */
printf( "File size : %ld\n", buf.st_size );//文件大小
printf( "Drive : %c:\n", buf.st_dev + 'A' );//所在盘符
printf( "Time modified : %s\n", ctime( &buf.st_atime ) );//文件修改时间
printf( "Program info : %d", &buf.st_ino );
}
}