5 #include <libsmbclient.h>
6 #include "get_auth_data_fn.h"
9 int main(int argc
, char * argv
[])
15 const char * pSmbPath
= NULL
;
16 const char * pLocalPath
= NULL
;
21 pSmbPath
= "smb://RANDOM/Public/small";
22 pLocalPath
= "/random/home/samba/small";
37 "%s [ smb://path/to/file [ /nfs/or/local/path/to/file ] ]\n",
42 smbc_init(get_auth_data_fn
, debug
);
44 if (smbc_stat(pSmbPath
, &st
) < 0)
50 printf("\nSAMBA\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n",
51 (long long)st
.st_mtime
, ctime_r(&st
.st_mtime
, m_time
),
52 (long long)st
.st_ctime
, ctime_r(&st
.st_ctime
, c_time
),
53 (long long)st
.st_atime
, ctime_r(&st
.st_atime
, a_time
));
55 if (pLocalPath
!= NULL
)
57 if (stat(pLocalPath
, &st
) < 0)
63 printf("LOCAL\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n",
64 (long long)st
.st_mtime
, ctime_r(&st
.st_mtime
, m_time
),
65 (long long)st
.st_ctime
, ctime_r(&st
.st_ctime
, c_time
),
66 (long long)st
.st_atime
, ctime_r(&st
.st_atime
, a_time
));