#Getting end of path string for windows, unix, etc users.

1 messages · Page 1 of 1 (latest)

sour turret
#

When executing the program the user passes in a path string of the format:
file.ext1
dir1/dir2/file.ext1.ext2
dir1\dir2\file.ext1.ext2.ext3
dir1/dir2\file.ext1.ext2.ext3.ext4

I need to extract:
dir1/dir2/, file.ext1.ext2.ext3, and ext4

My concern:
I don't know how to separate these idiomatically without raw byte manipulation

glossy mulch
#

std.fs.path.dirname, std.fs.path.stem, std.fs.path.extension

sour turret
#

That's awesome

#

Is stem available for 0.10.x?

#

I'm being told std.fs.path has no member called stem

#

But the linter is showing it

glossy mulch
#

0.10.0 probably not, 0.10.1 maybe