My first interaction with any runtime which touched the filesystem and paths was in node.js many years ago.
I have to admire the path module in no...
For further actions, you may consider blocking this person and/or reporting abuse
I think std::path provides all the methods you're looking for. Did you try anything from here and have trouble with it?
PathBufis owned, likeString, andPathis a reference to a slice, likestr.Thanks Ben, I found a
joinmethod in the Path std lib, that looks fine, but Im scratching my head, there is no resolve.I honestly don't know a lot about Rust but I think you are trying to tell me that PathBuff can do string things. I dont even know if I can split strings and mess with them as a vec.
Ah, sorry, you're probably specifically looking for canonicalize?
Probably, word on the street (StackOverflow) is that there are issues with canonicalize (I should find out more), thanks for the push, I will go check it out.
also, interesting that this is part of the fs module. As I said before, I am used to node where this would be part of the path module.
Also one last thing, what the heck is Ok(()), I keep seeing this in the docs.
Not sure how serious you are, but "V Lang" is essentially a barely functional pile of broken promises and shouldn't be used for even toy work.
If you're interested in low-level languages that are more friendly than C++ (and that's not Rust), try D. Or, for a very young and yet unstable language, try Zig.
Interesting, I got the impression after reading the release date ... "umm theres a very specific release date here, this language is not ready is it..."
I will take a look at Zig
Nim lang one-liner Std Lib:
Use:
(Its 2 Lines, but
importcan be passed on command with--import:os, so is 1)Passing command line imports that's cheeting, still two lines just injected haha. I got the rust thing working thanks to Ben.
But you dont have to pass command line imports, you can use a
file.nim.cfg:But it was not about Code Golf anyways.
👑
Well played 😁
I am new to Rust from NodeJS. I was facing the same issue. This is the code example i came up with.

What have you got so far? Would help to see what code you have, so we can figure out where to go from that.
I don't think it really helps sharing code sometimes, you either know what I'm doing or you don't and if you do, you have done it before. Not to say that you haven't Yawer, it's just a tend to get better potential answers. I will share the working code. Ben helped me out big time.
Fair enough, on re-reading your post it seems you just need doc.rust-lang.org/std/env/fn.curre... and doc.rust-lang.org/std/path/struct.... to join together the current working directory and a string directory.
Thanks that is a good lead 😁