ICSharpCode.SharpZipLib.Zip.ZipNameTransform.IsValidName C# (CSharp) Method

IsValidName() public static method

Test a name to see if it is a valid name for a zip entry.
Zip path names are actually in unix format, and should only contain relative paths if a path is present. This means that the path stored should not contain a drive or device letter, or a leading slash. All slashes should forward slashes '/'. An empty name is valid where the input comes from standard input. A null name is not considered valid.
public static IsValidName ( string name ) : bool
name string The name to test.
return bool
        public static bool IsValidName(string name)
        {
            bool result =
                (name != null) &&
                (name.IndexOfAny(InvalidEntryChars) < 0) &&
                (name.IndexOf('/') != 0)
                ;
            return result;
        }

Same methods

ZipNameTransform::IsValidName ( string name, bool relaxed ) : bool