@@ -256,7 +256,7 @@ class MicroPythonBoard {
256
256
return Promise . resolve ( files )
257
257
}
258
258
259
- async fs_cat ( filePath ) {
259
+ async fs_cat_binary ( filePath ) {
260
260
if ( filePath ) {
261
261
await this . enter_raw_repl ( )
262
262
let output = await this . exec_raw (
@@ -269,18 +269,18 @@ class MicroPythonBoard {
269
269
return Promise . reject ( new Error ( `Path to file was not specified` ) )
270
270
}
271
271
272
- // async fs_cat(filePath) {
273
- // if (filePath) {
274
- // await this.enter_raw_repl()
275
- // let output = await this.exec_raw(
276
- // `with open('${filePath}','r') as f:\n while 1:\n b=f.read(256)\n if not b:break\n print(b,end='')`
277
- // )
278
- // await this.exit_raw_repl()
279
- // output = extract(output)
280
- // return Promise.resolve(fixLineBreak(output))
281
- // }
282
- // return Promise.reject(new Error(`Path to file was not specified`))
283
- // }
272
+ async fs_cat ( filePath ) {
273
+ if ( filePath ) {
274
+ await this . enter_raw_repl ( )
275
+ let output = await this . exec_raw (
276
+ `with open('${ filePath } ','r') as f:\n while 1:\n b=f.read(256)\n if not b:break\n print(b,end='')`
277
+ )
278
+ await this . exit_raw_repl ( )
279
+ output = extract ( output )
280
+ return Promise . resolve ( fixLineBreak ( output ) )
281
+ }
282
+ return Promise . reject ( new Error ( `Path to file was not specified` ) )
283
+ }
284
284
285
285
async fs_put ( src , dest , data_consumer ) {
286
286
data_consumer = data_consumer || function ( ) { }
0 commit comments