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:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
51 st.st_mtime, ctime_r(&st.st_mtime, m_time),
52 st.st_ctime, ctime_r(&st.st_ctime, c_time),
53 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:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
64 st.st_mtime, ctime_r(&st.st_mtime, m_time),
65 st.st_ctime, ctime_r(&st.st_ctime, c_time),
66 st.st_atime, ctime_r(&st.st_atime, a_time));