Created
January 19, 2026 03:46
-
-
Save singularitti/16857639470948d185d9b3ba4a703314 to your computer and use it in GitHub Desktop.
List strings to those that exist as valid filesystem paths #Julia #file-system
This file contains hidden or 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
| function list_valid_paths(paths) | |
| valid = [] | |
| for p in paths | |
| try | |
| expanded = expanduser(p) | |
| if ispath(expanded) | |
| push!(valid, expanded) | |
| end | |
| catch | |
| # Ignore malformed paths or permission issues | |
| end | |
| end | |
| return valid | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment