Last active
July 19, 2024 12:30
-
-
Save sogaiu/376a7908ebdef8aed13d960b04c5498a to your computer and use it in GitHub Desktop.
spork/path relpath for windows exploration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ janet | |
Janet 1.35.2-771956b5 linux/x64/gcc - '(doc)' for help | |
repl:1:> (import spork/path) | |
@{_ @{:value <cycle 0>} path/abspath @{:private true} path/abspath? @{:private true} path/basename @{:private true} path/delim @{:private true} path/dirname @{:private true} path/ext @{:private true} path/join @{:private true} path/normalize @{:private true} path/parts @{:private true} path/posix/abspath @{:private true} path/posix/abspath? @{:private true} path/posix/basename @{:private true} path/posix/delim @{:private true} path/posix/dirname @{:private true} path/posix/ext @{:private true} path/posix/join @{:private true} path/posix/normalize @{:private true} path/posix/parts @{:private true} path/posix/relpath @{:private true} path/posix/sep @{:private true} path/relpath @{:private true} path/sep @{:private true} path/win32/abspath @{:private true} path/win32/abspath? @{:private true} path/win32/basename @{:private true} path/win32/delim @{:private true} path/win32/dirname @{:private true} path/win32/ext @{:private true} path/win32/join @{:private true} ...} | |
repl:2:> (path/win32/relpath `C:\WINDOWS\SYSTEM32\` `C:\`) | |
"..\\..\\..\\" | |
repl:3:> (path/posix/relpath "/usr/local/lib/janet" "/usr/local/include") | |
"../../include" | |
repl:4:> (path/posix/relpath "/usr/local/lib/janet/" "/usr/local/include") | |
"../../../include" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment