5 #include <libsmbclient.h>
6 #include "get_auth_data_fn.h"
9 int main(int argc, char * argv[])
12 char * pSmbPath = NULL;
13 char * pLocalPath = NULL;
18 pSmbPath = "smb://RANDOM/Public/small";
19 pLocalPath = "/random/home/samba/small";
34 "%s [ smb://path/to/file [ /nfs/or/local/path/to/file ] ]\n",
39 smbc_init(get_auth_data_fn, 0);
41 int ret = smbc_stat(pSmbPath, &st);
43 printf("SAMBA\nret=%d,\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n", ret,
44 st.st_mtime, ctime(&st.st_mtime),
45 st.st_ctime, ctime(&st.st_ctime),
46 st.st_atime, ctime(&st.st_atime));
48 if (pLocalPath != NULL)
50 ret = stat(pLocalPath, &st);
52 printf("LOCAL\nret=%d,\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n", ret,
53 st.st_mtime, ctime(&st.st_mtime),
54 st.st_ctime, ctime(&st.st_ctime),
55 st.st_atime, ctime(&st.st_atime));