5 #include <libsmbclient.h>
6 #include "get_auth_data_fn.h"
9 int main(int argc
, char * argv
[])
16 char * pSmbPath
= NULL
;
17 char * pLocalPath
= NULL
;
22 pSmbPath
= "smb://RANDOM/Public/small";
23 pLocalPath
= "/random/home/samba/small";
38 "%s [ smb://path/to/file [ /nfs/or/local/path/to/file ] ]\n",
43 smbc_init(get_auth_data_fn
, debug
);
45 if (smbc_stat(pSmbPath
, &st
) < 0)
51 printf("\nSAMBA\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
52 st
.st_mtime
, ctime_r(&st
.st_mtime
, mtime
),
53 st
.st_ctime
, ctime_r(&st
.st_ctime
, ctime
),
54 st
.st_atime
, ctime_r(&st
.st_atime
, atime
));
56 if (pLocalPath
!= NULL
)
58 if (stat(pLocalPath
, &st
) < 0)
64 printf("LOCAL\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
65 st
.st_mtime
, ctime_r(&st
.st_mtime
, mtime
),
66 st
.st_ctime
, ctime_r(&st
.st_ctime
, ctime
),
67 st
.st_atime
, ctime_r(&st
.st_atime
, atime
));