Skip to content

stdlib_system: essential path functionality #999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

wassup05
Copy link
Contributor

@wassup05 wassup05 commented Jun 7, 2025

A few path related functions for ease of future functionality have been added.

  • joinpath: joins the given paths according to the platform's path-separator.
  • operator(/): as was suggested in the Fortran discourse here an operator is also provided for the same functionality
  • splitpath: splits the path following the last path-separator and returns the head and tail.
  • basename: just returns the tail of splitpath
  • dirname: just returns the head of splitpath

The pathsep parameter contains either / or \ depending on the platform and is a compile-time constant now, so is the parameter, ISWIN

Do let me know your thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant