From 223da5cfea8608f7b11f32720203a2704dd02601 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sun, 29 May 2016 15:33:04 -0400 Subject: fix module hierarchy; actually call common functions --- src/common.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/common.rs') diff --git a/src/common.rs b/src/common.rs index 063b166..8183bbf 100644 --- a/src/common.rs +++ b/src/common.rs @@ -3,14 +3,21 @@ extern crate utp; use std::str; use std::env; +use std::fs::File; +use std::io::Read; use std::process::exit; use utp::{UtpSocket}; -fn send_files(socket: UtpSocket, file_path: &str, recursive: bool) { +pub fn send_files(socket: &mut UtpSocket, file_path: &str, recursive: bool) { + assert!(!recursive); + let f = File::open(file_path).unwrap(); unimplemented!(); } -fn receive_files(socket: UtpSocket, file_path: &str) { - unimplemented!(); +pub fn receive_files(socket: &mut UtpSocket, file_path: &str, recursive: bool) { + assert!(!recursive); + let f = File::create(file_path).unwrap(); + + //f.set_len(); } -- cgit v1.2.3