Subversion Repositories Kolibri OS

Rev

Rev 9058 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
9057 turbocat 1
#include 
1408 serge 2
 
9057 turbocat 3
#pragma pack(push,1)
1408 serge 4
typedef struct
5
{
6
  char sec;
7
  char min;
8
  char hour;
9
  char rsv;
10
}detime_t;
11
 
12
typedef struct
13
{
14
  char  day;
15
  char  month;
16
  short year;
17
}dedate_t;
18
 
19
typedef struct
20
{
21
  unsigned    attr;
22
  unsigned    flags;
23
  union
24
  {
25
     detime_t  ctime;
26
     unsigned  cr_time;
27
  };
28
  union
29
  {
30
     dedate_t  cdate;
31
     unsigned  cr_date;
32
  };
33
  union
34
  {
35
     detime_t  atime;
36
     unsigned  acc_time;
37
  };
38
  union
39
  {
40
     dedate_t  adate;
41
     unsigned  acc_date;
42
  };
43
  union
44
  {
45
     detime_t  mtime;
46
     unsigned  mod_time;
47
  };
48
  union
49
  {
50
     dedate_t  mdate;
51
     unsigned  mod_date;
52
  };
53
  unsigned    size;
54
  unsigned    size_high;
55
} FILEINFO;
56
#pragma pack(pop)
57
 
9057 turbocat 58
int get_fileinfo(const char *path, FILEINFO *info)
1408 serge 59
{
9186 turbocat 60
    int err;
61
    ksys70_t  k;
62
    k.p00   = 5;
63
    k.p04dw = 0;
64
    k.p08dw = 0;
65
    k.p12   = 0;
66
    k.bdfe  = info;
67
    k.p20   = 0;
68
    k.p21   = path;
9058 turbocat 69
   return FS_Service(&k, &err);
9057 turbocat 70
}