Microsoft SDK for Java

validateFilename

This method of the Path Class checks a file name, and if it is not valid, attempts to correct it.

Syntax

public static String validateFilename(String origfilename, char replch) throws IOException;

Return Value

Returns a valid file name or the original file name, if it is already valid.

Parameters

origfilename The file name to check and correct.
replch The character to replace invalid characters with.

Exceptions

IOException if the file name cannot be corrected.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.