Lines Matching refs:index
57 int SMB_download(char *serverpath, int index)
62 char *localpath = serverpath_to_localpath(serverpath, index);
70 write_log(S_DOWNLOAD, "", serverpath, index);
93 SMB_init(index);
137 int SMB_upload(char *localpath, int index)
145 write_log(S_UPLOAD, "", localpath, index);
147 SMB_init(index);
152 char *serverpath = localpath_to_serverpath(localpath, index);
182 FILE *f_stream = fopen(g_pSyncList[index]->up_item_file, "w");
195 int SMB_remo(char *localoldpath, char *localnewpath, int index)
197 SMB_init(index);
199 serveroldpath = localpath_to_serverpath(localoldpath, index);
200 servernewpath = localpath_to_serverpath(localnewpath, index);
205 res = SMB_upload(localnewpath, index);
208 time_t modtime = Getmodtime(servernewpath, index);
209 if(ChangeFile_modtime(localnewpath, modtime, index))
215 res = moveFolder(localoldpath, localnewpath, index);
223 int SMB_del(char *url, int index)
225 SMB_init(index);
249 SMB_del(new_url, index);
262 int SMB_rm(char *localpath, int index)
266 int exsit = is_server_exist(localpath, index);
269 char *serverpath = localpath_to_serverpath(localpath, index);
270 res = SMB_del(serverpath, index);
276 int SMB_mkdir(char *localpath, int index)
285 SMB_init(index);
287 char *serverpath = localpath_to_serverpath(localpath, index);
306 int SMB_init(int index)
308 strcpy(g_workgroup, smb_config.multrule[index]->workgroup);
309 strcpy(g_username, smb_config.multrule[index]->acount);
310 strcpy(g_password, smb_config.multrule[index]->password);