aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.rs
diff options
context:
space:
mode:
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();
}