@@ -50,20 +50,6 @@ pub trait RemoteCallback {
50
50
fn fire ( & mut self ) ;
51
51
}
52
52
53
- /// Description of what to do when a file handle is closed
54
- pub enum CloseBehavior {
55
- /// Do not close this handle when the object is destroyed
56
- DontClose ,
57
- /// Synchronously close the handle, meaning that the task will block when
58
- /// the handle is destroyed until it has been fully closed.
59
- CloseSynchronously ,
60
- /// Asynchronously closes a handle, meaning that the task will *not* block
61
- /// when the handle is destroyed, but the handle will still get deallocated
62
- /// and cleaned up (but this will happen asynchronously on the local event
63
- /// loop).
64
- CloseAsynchronously ,
65
- }
66
-
67
53
/// Data needed to spawn a process. Serializes the `std::io::process::Command`
68
54
/// builder.
69
55
pub struct ProcessConfig < ' a > {
@@ -202,28 +188,6 @@ pub trait IoFactory {
202
188
hint : Option < AddrinfoHint > )
203
189
-> IoResult < Vec < AddrinfoInfo > > ;
204
190
205
- // filesystem operations
206
- fn fs_from_raw_fd ( & mut self , fd : c_int , close : CloseBehavior )
207
- -> Box < RtioFileStream + Send > ;
208
- fn fs_open ( & mut self , path : & CString , fm : FileMode , fa : FileAccess )
209
- -> IoResult < Box < RtioFileStream + Send > > ;
210
- fn fs_unlink ( & mut self , path : & CString ) -> IoResult < ( ) > ;
211
- fn fs_stat ( & mut self , path : & CString ) -> IoResult < FileStat > ;
212
- fn fs_mkdir ( & mut self , path : & CString , mode : uint ) -> IoResult < ( ) > ;
213
- fn fs_chmod ( & mut self , path : & CString , mode : uint ) -> IoResult < ( ) > ;
214
- fn fs_rmdir ( & mut self , path : & CString ) -> IoResult < ( ) > ;
215
- fn fs_rename ( & mut self , path : & CString , to : & CString ) -> IoResult < ( ) > ;
216
- fn fs_readdir ( & mut self , path : & CString , flags : c_int ) ->
217
- IoResult < Vec < CString > > ;
218
- fn fs_lstat ( & mut self , path : & CString ) -> IoResult < FileStat > ;
219
- fn fs_chown ( & mut self , path : & CString , uid : int , gid : int ) ->
220
- IoResult < ( ) > ;
221
- fn fs_readlink ( & mut self , path : & CString ) -> IoResult < CString > ;
222
- fn fs_symlink ( & mut self , src : & CString , dst : & CString ) -> IoResult < ( ) > ;
223
- fn fs_link ( & mut self , src : & CString , dst : & CString ) -> IoResult < ( ) > ;
224
- fn fs_utime ( & mut self , src : & CString , atime : u64 , mtime : u64 ) ->
225
- IoResult < ( ) > ;
226
-
227
191
// misc
228
192
fn timer_init ( & mut self ) -> IoResult < Box < RtioTimer + Send > > ;
229
193
fn spawn ( & mut self , cfg : ProcessConfig )
@@ -296,19 +260,6 @@ pub trait RtioTimer {
296
260
fn period ( & mut self , msecs : u64 , cb : Box < Callback + Send > ) ;
297
261
}
298
262
299
- pub trait RtioFileStream {
300
- fn read ( & mut self , buf : & mut [ u8 ] ) -> IoResult < int > ;
301
- fn write ( & mut self , buf : & [ u8 ] ) -> IoResult < ( ) > ;
302
- fn pread ( & mut self , buf : & mut [ u8 ] , offset : u64 ) -> IoResult < int > ;
303
- fn pwrite ( & mut self , buf : & [ u8 ] , offset : u64 ) -> IoResult < ( ) > ;
304
- fn seek ( & mut self , pos : i64 , whence : SeekStyle ) -> IoResult < u64 > ;
305
- fn tell ( & self ) -> IoResult < u64 > ;
306
- fn fsync ( & mut self ) -> IoResult < ( ) > ;
307
- fn datasync ( & mut self ) -> IoResult < ( ) > ;
308
- fn truncate ( & mut self , offset : i64 ) -> IoResult < ( ) > ;
309
- fn fstat ( & mut self ) -> IoResult < FileStat > ;
310
- }
311
-
312
263
pub trait RtioProcess {
313
264
fn id ( & self ) -> libc:: pid_t ;
314
265
fn kill ( & mut self , signal : int ) -> IoResult < ( ) > ;
@@ -399,43 +350,6 @@ pub enum ProcessExit {
399
350
ExitSignal ( int ) ,
400
351
}
401
352
402
- pub enum FileMode {
403
- Open ,
404
- Append ,
405
- Truncate ,
406
- }
407
-
408
- pub enum FileAccess {
409
- Read ,
410
- Write ,
411
- ReadWrite ,
412
- }
413
-
414
- pub struct FileStat {
415
- pub size : u64 ,
416
- pub kind : u64 ,
417
- pub perm : u64 ,
418
- pub created : u64 ,
419
- pub modified : u64 ,
420
- pub accessed : u64 ,
421
- pub device : u64 ,
422
- pub inode : u64 ,
423
- pub rdev : u64 ,
424
- pub nlink : u64 ,
425
- pub uid : u64 ,
426
- pub gid : u64 ,
427
- pub blksize : u64 ,
428
- pub blocks : u64 ,
429
- pub flags : u64 ,
430
- pub gen : u64 ,
431
- }
432
-
433
- pub enum SeekStyle {
434
- SeekSet ,
435
- SeekEnd ,
436
- SeekCur ,
437
- }
438
-
439
353
pub struct AddrinfoHint {
440
354
pub family : uint ,
441
355
pub socktype : uint ,
0 commit comments