@@ -22,7 +22,7 @@ use std::rt::local::Local;
22
22
use std:: rt:: sched:: { Scheduler , SchedHandle } ;
23
23
use std:: vec;
24
24
25
- use super :: { NativeHandle , Loop , UvError , uv_error_to_io_error} ;
25
+ use super :: { Loop , UvError , uv_error_to_io_error} ;
26
26
use uvio:: HomingIO ;
27
27
use uvll;
28
28
@@ -43,7 +43,7 @@ impl FsRequest {
43
43
-> Result < FileWatcher , UvError >
44
44
{
45
45
execute ( |req, cb| unsafe {
46
- uvll:: uv_fs_open ( loop_. native_handle ( ) ,
46
+ uvll:: uv_fs_open ( loop_. handle ,
47
47
req, path. with_ref ( |p| p) , flags as c_int ,
48
48
mode as c_int , cb)
49
49
} ) . map ( |req|
@@ -54,21 +54,21 @@ impl FsRequest {
54
54
55
55
pub fn unlink ( loop_ : & Loop , path : & CString ) -> Result < ( ) , UvError > {
56
56
execute_nop ( |req, cb| unsafe {
57
- uvll:: uv_fs_unlink ( loop_. native_handle ( ) , req, path. with_ref ( |p| p) ,
57
+ uvll:: uv_fs_unlink ( loop_. handle , req, path. with_ref ( |p| p) ,
58
58
cb)
59
59
} )
60
60
}
61
61
62
62
pub fn lstat ( loop_ : & Loop , path : & CString ) -> Result < FileStat , UvError > {
63
63
execute ( |req, cb| unsafe {
64
- uvll:: uv_fs_lstat ( loop_. native_handle ( ) , req, path. with_ref ( |p| p) ,
64
+ uvll:: uv_fs_lstat ( loop_. handle , req, path. with_ref ( |p| p) ,
65
65
cb)
66
66
} ) . map ( |req| req. mkstat ( ) )
67
67
}
68
68
69
69
pub fn stat ( loop_ : & Loop , path : & CString ) -> Result < FileStat , UvError > {
70
70
execute ( |req, cb| unsafe {
71
- uvll:: uv_fs_stat ( loop_. native_handle ( ) , req, path. with_ref ( |p| p) ,
71
+ uvll:: uv_fs_stat ( loop_. handle , req, path. with_ref ( |p| p) ,
72
72
cb)
73
73
} ) . map ( |req| req. mkstat ( ) )
74
74
}
@@ -77,7 +77,7 @@ impl FsRequest {
77
77
-> Result < ( ) , UvError >
78
78
{
79
79
execute_nop ( |req, cb| unsafe {
80
- uvll:: uv_fs_write ( loop_. native_handle ( ) , req,
80
+ uvll:: uv_fs_write ( loop_. handle , req,
81
81
fd, vec:: raw:: to_ptr ( buf) as * c_void ,
82
82
buf. len ( ) as c_uint , offset, cb)
83
83
} )
@@ -87,7 +87,7 @@ impl FsRequest {
87
87
-> Result < int , UvError >
88
88
{
89
89
do execute ( |req, cb| unsafe {
90
- uvll:: uv_fs_read ( loop_. native_handle ( ) , req,
90
+ uvll:: uv_fs_read ( loop_. handle , req,
91
91
fd, vec:: raw:: to_ptr ( buf) as * c_void ,
92
92
buf. len ( ) as c_uint , offset, cb)
93
93
} ) . map |req| {
@@ -98,12 +98,12 @@ impl FsRequest {
98
98
pub fn close ( loop_ : & Loop , fd : c_int , sync : bool ) -> Result < ( ) , UvError > {
99
99
if sync {
100
100
execute_nop ( |req, cb| unsafe {
101
- uvll:: uv_fs_close ( loop_. native_handle ( ) , req, fd, cb)
101
+ uvll:: uv_fs_close ( loop_. handle , req, fd, cb)
102
102
} )
103
103
} else {
104
104
unsafe {
105
105
let req = uvll:: malloc_req ( uvll:: UV_FS ) ;
106
- uvll:: uv_fs_close ( loop_. native_handle ( ) , req, fd, close_cb) ;
106
+ uvll:: uv_fs_close ( loop_. handle , req, fd, close_cb) ;
107
107
return Ok ( ( ) ) ;
108
108
}
109
109
@@ -120,14 +120,14 @@ impl FsRequest {
120
120
-> Result < ( ) , UvError >
121
121
{
122
122
execute_nop ( |req, cb| unsafe {
123
- uvll:: uv_fs_mkdir ( loop_. native_handle ( ) , req, path. with_ref ( |p| p) ,
123
+ uvll:: uv_fs_mkdir ( loop_. handle , req, path. with_ref ( |p| p) ,
124
124
mode, cb)
125
125
} )
126
126
}
127
127
128
128
pub fn rmdir ( loop_ : & Loop , path : & CString ) -> Result < ( ) , UvError > {
129
129
execute_nop ( |req, cb| unsafe {
130
- uvll:: uv_fs_rmdir ( loop_. native_handle ( ) , req, path. with_ref ( |p| p) ,
130
+ uvll:: uv_fs_rmdir ( loop_. handle , req, path. with_ref ( |p| p) ,
131
131
cb)
132
132
} )
133
133
}
@@ -136,7 +136,7 @@ impl FsRequest {
136
136
-> Result < ( ) , UvError >
137
137
{
138
138
execute_nop ( |req, cb| unsafe {
139
- uvll:: uv_fs_rename ( loop_. native_handle ( ) ,
139
+ uvll:: uv_fs_rename ( loop_. handle ,
140
140
req,
141
141
path. with_ref ( |p| p) ,
142
142
to. with_ref ( |p| p) ,
@@ -148,7 +148,7 @@ impl FsRequest {
148
148
-> Result < ( ) , UvError >
149
149
{
150
150
execute_nop ( |req, cb| unsafe {
151
- uvll:: uv_fs_chmod ( loop_. native_handle ( ) , req, path. with_ref ( |p| p) ,
151
+ uvll:: uv_fs_chmod ( loop_. handle , req, path. with_ref ( |p| p) ,
152
152
mode, cb)
153
153
} )
154
154
}
@@ -157,7 +157,7 @@ impl FsRequest {
157
157
-> Result < ~[ Path ] , UvError >
158
158
{
159
159
execute ( |req, cb| unsafe {
160
- uvll:: uv_fs_readdir ( loop_. native_handle ( ) ,
160
+ uvll:: uv_fs_readdir ( loop_. handle ,
161
161
req, path. with_ref ( |p| p) , flags, cb)
162
162
} ) . map ( |req| unsafe {
163
163
let mut paths = ~[ ] ;
@@ -174,7 +174,7 @@ impl FsRequest {
174
174
175
175
pub fn readlink ( loop_ : & Loop , path : & CString ) -> Result < Path , UvError > {
176
176
do execute ( |req, cb| unsafe {
177
- uvll:: uv_fs_readlink ( loop_. native_handle ( ) , req,
177
+ uvll:: uv_fs_readlink ( loop_. handle , req,
178
178
path. with_ref ( |p| p) , cb)
179
179
} ) . map |req| {
180
180
Path :: new ( unsafe {
@@ -187,7 +187,7 @@ impl FsRequest {
187
187
-> Result < ( ) , UvError >
188
188
{
189
189
execute_nop ( |req, cb| unsafe {
190
- uvll:: uv_fs_chown ( loop_. native_handle ( ) ,
190
+ uvll:: uv_fs_chown ( loop_. handle ,
191
191
req, path. with_ref ( |p| p) ,
192
192
uid as uvll:: uv_uid_t ,
193
193
gid as uvll:: uv_gid_t ,
@@ -199,15 +199,15 @@ impl FsRequest {
199
199
-> Result < ( ) , UvError >
200
200
{
201
201
execute_nop ( |req, cb| unsafe {
202
- uvll:: uv_fs_ftruncate ( loop_. native_handle ( ) , req, file, offset, cb)
202
+ uvll:: uv_fs_ftruncate ( loop_. handle , req, file, offset, cb)
203
203
} )
204
204
}
205
205
206
206
pub fn link ( loop_ : & Loop , src : & CString , dst : & CString )
207
207
-> Result < ( ) , UvError >
208
208
{
209
209
execute_nop ( |req, cb| unsafe {
210
- uvll:: uv_fs_link ( loop_. native_handle ( ) , req,
210
+ uvll:: uv_fs_link ( loop_. handle , req,
211
211
src. with_ref ( |p| p) ,
212
212
dst. with_ref ( |p| p) ,
213
213
cb)
@@ -218,7 +218,7 @@ impl FsRequest {
218
218
-> Result < ( ) , UvError >
219
219
{
220
220
execute_nop ( |req, cb| unsafe {
221
- uvll:: uv_fs_symlink ( loop_. native_handle ( ) , req,
221
+ uvll:: uv_fs_symlink ( loop_. handle , req,
222
222
src. with_ref ( |p| p) ,
223
223
dst. with_ref ( |p| p) ,
224
224
0 , cb)
@@ -227,13 +227,13 @@ impl FsRequest {
227
227
228
228
pub fn fsync ( loop_ : & Loop , fd : c_int ) -> Result < ( ) , UvError > {
229
229
execute_nop ( |req, cb| unsafe {
230
- uvll:: uv_fs_fsync ( loop_. native_handle ( ) , req, fd, cb)
230
+ uvll:: uv_fs_fsync ( loop_. handle , req, fd, cb)
231
231
} )
232
232
}
233
233
234
234
pub fn datasync ( loop_ : & Loop , fd : c_int ) -> Result < ( ) , UvError > {
235
235
execute_nop ( |req, cb| unsafe {
236
- uvll:: uv_fs_fdatasync ( loop_. native_handle ( ) , req, fd, cb)
236
+ uvll:: uv_fs_fdatasync ( loop_. handle , req, fd, cb)
237
237
} )
238
238
}
239
239
0 commit comments