STAT
Signal transducers and activators of transcription(信号传导及转录激活因子),含有SH2和SH3结构域,可与特定的含磷酸化酪氨酸的肽段结合。当STAT被磷酸化后,发生聚合成为活化的转录激活因子形式,进入胞核内与靶基因结合,促进其转录。现在已克隆成功4种JAK(JAK1~3和Tyk2)与6种STAT(Stat1~6)。
在计算机语言中
函数名: stat()
功 能: 得到文件的信息
用 法: int _stat(const char *path,struct _stat *buffer)
程序例:
// crt_stat.c
// This program uses the _stat function to
// report information about the file named crt_stat.c.
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <errno.h>
int main( void )
{
struct _stat buf;
int result;
char timebuf[26];
char* filename = "crt_stat.c";
errno_t err;
// Get data associated with "crt_stat.c":
result = _stat( filename, &buf );
// Check if statistics are valid:
if( result != 0 )
{
perror( "Problem getting information" );
switch (errno)
{
case ENOENT:
printf("File %s not found.
", filename);
break;
case EINVAL:
printf("Invalid parameter to _stat.
");
break;
default:
/* Should never be reached. */
printf("Unexpected error in _stat.
");
}
}
else
{
// Output some of the statistics:
printf( "File size : %ld
", buf.st_size );
printf( "Drive : %c:
", buf.st_dev + 'A' );
err = ctime_s(timebuf, 26, &buf.st_mtime);
if (err)
{
printf("Invalid arguments to ctime_s.");
exit(1);
}
printf( "Time modified : %s", timebuf );
}
}
输出结果:
File size : 732
Drive : C:
Time modified : Thu Feb 07 14:39:36 2002
stat结构体struct stat finfo;
stat( sFileName, &finfo );
int size = finfo.st_size;
struct stat {
mode_t st_mode; //文件对应的模式,文件,目录等
ino_t st_ino; //inode节点号
dev_t st_dev; //设备号码
dev_t st_rdev; //特殊设备号码
nlink_t st_nlink; //文件的连接数
uid_t st_uid; //文件所有者
gid_t st_gid; //文件所有者对应的组
off_t st_size; //普通文件,对应的文件字节数
time_t st_atime; //文件最后被访问的时间
time_t st_mtime; //文件内容最后被修改的时间
time_t st_ctime; //文件状态改变时间
blksize_t st_blksize; //文件内容对应的块大小
blkcnt_t st_blocks; //伟建内容对应的块数量
};