aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.rs
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2016-05-29 15:33:04 -0400
committerbnewbold <bnewbold@robocracy.org>2016-05-29 15:33:04 -0400
commit223da5cfea8608f7b11f32720203a2704dd02601 (patch)
treea03b59582f29488fb52fcba7485b8da276339da9 /src/common.rs
parenta7b4e46f76ec70f71a189a1f3fbbd30370d82b4f (diff)
downloaducp-223da5cfea8608f7b11f32720203a2704dd02601.tar.gz
ucp-223da5cfea8608f7b11f32720203a2704dd02601.zip
fix module hierarchy; actually call common functions
Diffstat (limited to 'src/common.rs')
-rw-r--r--src/common.rs13
1 files changed, 10 insertions, 3 deletions
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();
}