Conversation
mkdir
Fixed to use with new interface. Also it currently fails and needs to be finished. Perhaps add a flag argument for how many lines.
updating fork
mkdir
initial commit
Added "-p"
Also the test file didn't have a newline at the end.
passing second test
word test
Catching ash up to master
Also you pass one more test now.
Fixing initialization issue
|
If you now do a pull from this branch you'll get the files that I added, This is a copy of |
|
What are the cases (if any) where fs.delete(*source file*) can fail? Edit: it fails when what's in parenthesis isn't a file and is a file directory, in which case fs.deleteDirectory should be used |
|
"There was a compilation error when trying to create the wasm binary for file: packages/ash/assembly/tests/mv.spec.ts." This problem only exists when I have my lines added in trying to delete the source file. I've looked at trying to close the file before deleting it but all the syntax is still a little confusing. Is there something else I need to do or is just closing the source file and deleting it fine? |
Now delete returns an error code.
|
Thought I should do a try-catch block to see if fs.delete fails due to being passed a directory but apparently try-catch isn't supported. How can I test if what's given is a file or directory? Just look at the end of the string? |
|
You have |
|
But that doesn't seem to be the case with the example 'cp' code, it only used openFile |
|
From above > "For now just moving files will suffice so you'll really just need to use fs.delete." So you only need |
| let srcString = srcFile.readString().result; | ||
| log<string>(srcString); | ||
| dstFile.result.writeString(srcString); | ||
| if(res.failed) { |
There was a problem hiding this comment.
If this is true then you would have triggered line 24., which should also return early.
fixes #117