File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed
branches/auto/src/libcore/rt Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -14,5 +14,5 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
14
14
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
15
15
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
16
16
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17
- refs/heads/auto: 57e85b5f947387195cec1338fcb94b7cfb88bd86
17
+ refs/heads/auto: 7ef54c7ecd625376de092cbd741621987673c45f
18
18
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
Original file line number Diff line number Diff line change @@ -498,6 +498,42 @@ impl NativeHandle<*uvll::uv_write_t> for WriteRequest {
498
498
}
499
499
}
500
500
501
+ type FsCallback = ~fn ( FsRequest , Option < UvError > ) ;
502
+ impl Callback for FsCallback { }
503
+
504
+ pub struct FsRequest ( * uvll:: uv_fs_t ) ;
505
+
506
+ impl Request for FsRequest ;
507
+
508
+ impl FsRequest {
509
+ static fn new( ) -> FsRequest {
510
+ let fs_req = unsafe { malloc_req( UV_FS ) } ;
511
+ fail_unless!( fs_req. is_not_null( ) ) ;
512
+ let fs_req = fs_req as * uvll: : uv_write_t ;
513
+ uvll:: set_data_for_uv_req( fs_req, null:: < ( ) > ( ) ) ;
514
+ Native ( fs_req)
515
+ }
516
+
517
+ fn delete ( self ) {
518
+ unsafe { free_req ( self . native_handle ( ) as * c_void ) }
519
+ }
520
+
521
+ fn open ( & mut self , loop_ : & EventLoop , cb : FsCallback ) {
522
+ }
523
+
524
+ fn close ( & mut self , loop_ : & EventLoop , cb : FsCallback ) {
525
+ }
526
+ }
527
+
528
+ impl NativeHandle < * uvll:: uv_fs_t > for FsRequest {
529
+ static fn from_native_handle( handle: * uvll:: uv_fs_t ) -> FsRequest {
530
+ FsRequest ( handle )
531
+ }
532
+ fn native_handle ( & self ) -> * uvll:: uv_fs_t {
533
+ match self { & FsRequest ( ptr) => ptr }
534
+ }
535
+ }
536
+
501
537
// XXX: Need to define the error constants like EOF so they can be
502
538
// compared to the UvError type
503
539
You can’t perform that action at this time.
0 commit comments