Lines Matching refs:fd
157 int fd; in file_connect() local
212 fd = open_readonly(actual_path, O_RDONLY|O_BINARY); in file_connect()
229 fd = -1; in file_connect()
236 fd = open_readonly(real_path + 1, O_RDONLY); in file_connect()
241 fd = open_readonly(real_path, O_RDONLY); in file_connect()
245 fd = open_readonly(real_path, O_RDONLY); in file_connect()
252 file->fd = fd; in file_connect()
253 if(!data->state.upload && (fd == -1)) { in file_connect()
273 if(file->fd != -1) in file_done()
274 close(file->fd); in file_done()
275 file->fd = -1; in file_done()
300 int fd; in file_upload() local
332 fd = open(file->path, mode, data->set.new_file_perms); in file_upload()
333 if(fd < 0) { in file_upload()
344 if(fstat(fd, &file_stat)) { in file_upload()
345 close(fd); in file_upload()
387 nwrite = write(fd, sendbuf, nread); in file_upload()
406 close(fd); in file_upload()
434 int fd; in file_do() local
447 fd = file->fd; in file_do()
450 if(-1 != fstat(fd, &statbuf)) { in file_do()
557 lseek(fd, data->state.resume_from, SEEK_SET)) in file_do()
582 nread = read(fd, xfer_buf, bytestoread); in file_do()