public final class Name extends Object
Names of files and directories.
Modifier and Type | Method and Description |
---|---|
static boolean |
isValid(String name)
Determine whether or not the given
name is valid. |
public static boolean isValid(String name)
Determine whether or not the given name
is valid.
Names in jvvfs
are specifically not allowed to contain:
(['/'], ASCII [0x2f])
, as this is used
as a path separator on UNIX and in jvvfs
virtual paths.(['\'], ASCII [0x5c])
, as this is used as a
path separator on Microsoft Windows.(['.'], ASCII [0x2e])
, as
this is a reserved name on UNIX-like platforms.([':'], ASCII [0x3a])
, as these are used to
identify "drives" on some operating systems.(ASCII [0x0])
, as almost no operating systems
permit these in file names.Empty strings are not considered to be valid names.
name
- The name.true
if the name is valid.Copyright © 2015 <code@io7m.com> http://io7m.com