std.path.getName(): Screwy by design?

Johannes Pfau spam at example.com
Tue Mar 1 05:11:43 PST 2011


Steven Schveighoffer wrote:
>On Tue, 01 Mar 2011 04:16:36 -0500, Jonathan M Davis
><jmdavisProg at gmx.com> wrote:
>
>> I can understand if the path stuff
>> can't deal with / or \ in file names (that's probably not worth
>> trying to get to
>> work right), but it _should_ be able to handle directories with dots
>> in them and
>> files with no extension.
>
>/ and \ are not legal in names on any filesystem that I know of.
>
>-Steve

Just tested it on ubuntu/ext4 and '\' in a filename works.
-----------------
File names in Linux can contain any characters other than (1) a forward
slash ( / ), which is reserved for use as the name of the root
directory (i.e., the directory that contains all other directories and
files) and as a directory separator, and (2) the null character (which
is used to terminate segments of text). Spaces are permitted, although
they are best avoided because they can be incompatible with legacy
software in some cases.
-----------------
http://www.linfo.org/file_name.html

-- 
Johannes Pfau
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110301/f88abe0f/attachment.pgp>


More information about the Digitalmars-d mailing list