File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,11 @@ impl Vfs for OsFs {
132
132
Ok ( ( list, None ) )
133
133
}
134
134
135
+ async fn cp ( & self , from : & str , to : & str ) -> VfsResult < ( ) > {
136
+ fs:: copy ( self . get_real_path ( from) ?, self . get_real_path ( to) ?) . await ?;
137
+ Ok ( ( ) )
138
+ }
139
+
135
140
async fn metadata ( & self , path : & str ) -> VfsResult < Box < dyn VMetadata > > {
136
141
let path = self . get_real_path ( path) ?;
137
142
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ pub trait Vfs: Sync + Send {
32
32
skip_token : Option < String > ,
33
33
) -> VfsResult < ( Vec < Box < dyn VMetadata > > , Option < String > ) > ;
34
34
35
+ async fn cp ( & self , from : & str , to : & str ) -> VfsResult < ( ) > ;
35
36
async fn metadata ( & self , path : & str ) -> VfsResult < Box < dyn VMetadata > > ;
36
-
37
37
async fn mkdir ( & self , path : & str ) -> VfsResult < ( ) > ;
38
38
async fn mv ( & self , from : & str , to : & str ) -> VfsResult < ( ) > ;
39
39
async fn open ( & self , path : & str , options : OpenOptions ) -> VfsResult < Pin < Box < dyn VFile > > > ;
You can’t perform that action at this time.
0 commit comments