@@ -83,61 +83,61 @@ impl Accessor for DalRuntime {
8383 . metadata ( )
8484 }
8585
86- fn presign ( & self , args : & OpPresign ) -> Result < PresignedRequest > {
87- self . get_inner ( ) ?. presign ( args)
88- }
89-
90- async fn create ( & self , args : & OpCreate ) -> Result < ( ) > {
86+ async fn create ( & self , path : & str , args : OpCreate ) -> Result < ( ) > {
9187 let op = self . get_inner ( ) ?;
92- let args = args . clone ( ) ;
88+ let path = path . to_string ( ) ;
9389 self . runtime
94- . spawn ( async move { op. create ( & args) . await } )
90+ . spawn ( async move { op. create ( & path , args) . await } )
9591 . await
9692 . expect ( "join must success" )
9793 }
9894
99- async fn read ( & self , args : & OpRead ) -> Result < BytesReader > {
95+ async fn read ( & self , path : & str , args : OpRead ) -> Result < BytesReader > {
10096 let op = self . get_inner ( ) ?;
101- let args = args . clone ( ) ;
97+ let path = path . to_string ( ) ;
10298 self . runtime
103- . spawn ( async move { op. read ( & args) . await } )
99+ . spawn ( async move { op. read ( & path , args) . await } )
104100 . await
105101 . expect ( "join must success" )
106102 }
107103
108- async fn write ( & self , args : & OpWrite , r : BytesReader ) -> Result < u64 > {
104+ async fn write ( & self , path : & str , args : OpWrite , r : BytesReader ) -> Result < u64 > {
109105 let op = self . get_inner ( ) ?;
110- let args = args . clone ( ) ;
106+ let path = path . to_string ( ) ;
111107 self . runtime
112- . spawn ( async move { op. write ( & args, r) . await } )
108+ . spawn ( async move { op. write ( & path , args, r) . await } )
113109 . await
114110 . expect ( "join must success" )
115111 }
116112
117- async fn stat ( & self , args : & OpStat ) -> Result < ObjectMetadata > {
113+ async fn stat ( & self , path : & str , args : OpStat ) -> Result < ObjectMetadata > {
118114 let op = self . get_inner ( ) ?;
119- let args = args . clone ( ) ;
115+ let path = path . to_string ( ) ;
120116 self . runtime
121- . spawn ( async move { op. stat ( & args) . await } )
117+ . spawn ( async move { op. stat ( & path , args) . await } )
122118 . await
123119 . expect ( "join must success" )
124120 }
125121
126- async fn delete ( & self , args : & OpDelete ) -> Result < ( ) > {
122+ async fn delete ( & self , path : & str , args : OpDelete ) -> Result < ( ) > {
127123 let op = self . get_inner ( ) ?;
128- let args = args . clone ( ) ;
124+ let path = path . to_string ( ) ;
129125 self . runtime
130- . spawn ( async move { op. delete ( & args) . await } )
126+ . spawn ( async move { op. delete ( & path , args) . await } )
131127 . await
132128 . expect ( "join must success" )
133129 }
134130
135- async fn list ( & self , args : & OpList ) -> Result < DirStreamer > {
131+ async fn list ( & self , path : & str , args : OpList ) -> Result < DirStreamer > {
136132 let op = self . get_inner ( ) ?;
137- let args = args . clone ( ) ;
133+ let path = path . to_string ( ) ;
138134 self . runtime
139- . spawn ( async move { op. list ( & args) . await } )
135+ . spawn ( async move { op. list ( & path , args) . await } )
140136 . await
141137 . expect ( "join must success" )
142138 }
139+
140+ fn presign ( & self , path : & str , args : OpPresign ) -> Result < PresignedRequest > {
141+ self . get_inner ( ) ?. presign ( path, args)
142+ }
143143}
0 commit comments