summary refs log tree commit diff
path: root/src/libcore/rt/io/file.rs
blob: b7f3ed280a84555a2ff568bb7964985f3a3c52c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use prelude::*;
use super::Stream;

pub struct FileStream;

pub impl FileStream {
    fn new(_path: Path) -> FileStream {
        fail!()
    }
}

impl Stream for FileStream {
    fn read(&mut self, _buf: &mut [u8]) -> uint {
        fail!()
    }

    fn eof(&mut self) -> bool {
        fail!()
    }

    fn write(&mut self, _v: &const [u8]) {
        fail!()
    }
}

#[test]
#[ignore]
fn super_simple_smoke_test_lets_go_read_some_files_and_have_a_good_time() {
    let message = "it's alright. have a good time";
    let filename = Path("test.txt");
    let mut outstream = FileStream::new(filename);
    outstream.write(message.to_bytes());
}