Modify

Opened 12 years ago

Closed 10 years ago

Last modified 10 years ago

#621 closed Feature Requests (fixed)

filesystem::path as a template

Reported by: streetraider Owned by: Beman Dawes
Milestone: Component: filesystem
Version: None Severity: Showstopper
Keywords: Cc:

Description (last modified by Dave Abrahams)

I suggest boost::filesystem::path to be a template:

template <typename CharType = char>
class path;

Current path will be used as path<char>.

Of course it's unable to use path<wchar_t> for file
operations like open(), rename() and so on with current
C++ library. These function may take path<char> as
parameters.

But it's very useful to have path<wchar_t> dealing with
filenames! Any will be able to use it and pass them for
WinAPI functions by example, or use in any database
that support wide chars.

At second, I think path::extention() member function
will be useful to exctact extention of the file, such
as ".html" (or just "html") for "foo/bar.html".

Attachments (0)

Change History (4)

comment:1 Changed 10 years ago by Dave Abrahams

Cc: bdawes@… added
Component: Nonefilesystem
Description: modified (diff)
Severity: Showstopper

Can't reassign to Beman until he logs into Trac

comment:2 Changed 10 years ago by Dave Abrahams

Cc: bdawes@… removed
Owner: changed from nobody to Beman Dawes
Status: assignednew

comment:3 Changed 10 years ago by Beman Dawes

Resolution: Nonefixed
Status: newclosed

This feature was part of the internationalization package of changes, which was merged into the trunk in December of 2005, and can be used in 1.34.0 and later.

--Beman

comment:4 Changed 10 years ago by Beman Dawes

The requested extension() function has been provided the boost/filesystem/convenience.hpp headers since 2002.

--Beman

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Beman Dawes.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.