Skip to content

Commit b0e93e7

Browse files
upy-fs-hex: Add method to get a file size in bytes.
1 parent 9b17c94 commit b0e93e7

File tree

5 files changed

+150
-149
lines changed

5 files changed

+150
-149
lines changed

docs/quick-guide.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if (micropythonFs.exists('filename.txt')) {
2626
micropythonFs.remove('filename.txt');
2727
}
2828
micropythonFs.ls();
29+
var fileSizeInBytes = micropythonFs.size('filename.txt');
2930

3031
var intelHexWithFs = micropythonFs.getIntelHex();
3132
```
@@ -38,6 +39,6 @@ To add and remove the Python code using the old format:
3839
```js
3940
var finalHexStr = microbitFs.addIntelHexAppendedScript(originalIntelHexStr, 'print("hello world!")');
4041
if (microbitFs.isAppendedScriptPresent(finalHexStr)) {
41-
var pythonCode = getIntelHexAppendedScript(finalHexStr)
42+
var pythonCode = microbitFs.getIntelHexAppendedScript(finalHexStr)
4243
}
4344
```

0 commit comments

Comments
 (0)