Validates the given string as the name of a resource valid for one of the given types.
In addition to the basic restrictions on paths in general (see {@link IPath#isValidSegment(String)}), a resource name must also not contain any characters or substrings that are not valid on the file system on which workspace root is located. In addition, the names "." and ".." are reserved due to their special meaning in file system paths.
This validation check is done automatically as a resource is created (but not when the resource handle is constructed); this means that any resource that exists can be safely assumed to have a valid name and path. Note that the name of the workspace root resource is inherently invalid.
@param segment the name segment to be checked
@param typeMask bitwise-or of the resource type constants (
FILE
,
FOLDER
,
PROJECT
or
ROOT
) indicating expected resource type(s)
@return a status object with code
IStatus.OK
if the givenstring is valid as a resource name, otherwise a status object indicating what is wrong with the string
@see IResource#PROJECT
@see IResource#FOLDER
@see IResource#FILE
@see IStatus#OK