Skip to content
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

feature wish about dirname and basename in module Filename #3411

Closed
vicuna opened this issue Jul 4, 2002 · 1 comment
Closed

feature wish about dirname and basename in module Filename #3411

vicuna opened this issue Jul 4, 2002 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Jul 4, 2002

Original bug ID: 1222
Reporter: administrator
Status: closed (set by @xavierleroy on 2013-08-31T10:46:08Z)
Resolution: won't fix
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Claude Marché
Version: ocaml 3.04
OS: linux
Submission from: upsn104.u-psud.fr (193.55.10.104)

if I want both the dirname and the basename of a file f I need to
write

let (d,b) = (Filename.dirname f, Filename.basename f) in ...

which is probably twice the same job, it would be nice to have an additional
function

Filename.split : string -> string * string

returning both dirname and basename at the same time.

@vicuna
Copy link
Author

vicuna commented Jan 25, 2012

Comment author: @damiendoligez

It is not twice the same job, and the dirname/basename rules (which are now [in trunk] based on the POSIX specification) are a bit too involved to compute them both at the same time.

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

No branches or pull requests

1 participant