Click or drag to resize

FileName Class

Represents a path to a file. The equality operator is overloaded to compare for path equality (case insensitive, normalizing paths with '..\')
Inheritance Hierarchy
SystemObject
  Altaxo.Main.ServicesPathName
    Altaxo.Main.ServicesFileName

Namespace: Altaxo.Main.Services
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntax
C#
[TypeConverterAttribute(typeof(FileNameConverter))]
public sealed class FileName : PathName, 
	IEquatable<FileName>

The FileName type exposes the following members.

Constructors
 NameDescription
Public methodFileName Initializes a new instance of the FileName class.
Top
Properties
 NameDescription
Public propertyIsRelative Gets whether this path is relative.
(Inherited from PathName)
Top
Methods
 NameDescription
Public methodStatic memberCreate Creates a FileName instance from the string. It is valid to pass null or an empty string to this method (in that case, a null reference will be returned).
Public methodEquals(FileName)Indicates whether the current object is equal to another object of the same type.
Public methodEquals(Object)Determines whether the specified object is equal to the current object.
(Overrides ObjectEquals(Object))
Public methodExists Returns true if this directory exists in the file system.
(Overrides PathNameExists)
Public methodStatic memberGetDirectoryName Gets the name of the directory from the given file name. Throws an InvalidOperationException if a directory name could not be retrieved.
Public methodGetExtension Gets the file extension.
Public methodGetFileName Gets the file name (not the full path).
Public methodGetFileNameWithoutExtension Gets the file name without extension.
Public methodGetHashCodeServes as the default hash function.
(Overrides ObjectGetHashCode)
Public methodGetParentDirectory Gets the directory name.
(Inherited from PathName)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodHasExtension Gets whether this file name has the specified extension.
Public methodToStringReturns a string that represents the current object.
(Inherited from PathName)
Top
Operators
 NameDescription
Public operatorStatic memberEquality(FileName, FileName) Determines whether two file names are equal.
Public operatorStatic memberEquality(FileName, String) Determines whether a file name and a string path are equal.
Obsolete
Public operatorStatic memberEquality(String, FileName) Determines whether a string path and a file name are equal.
Obsolete
Public operatorStatic member(FileName to String) Converts a FileName to its string path.
Public operatorStatic memberInequality(FileName, FileName) Determines whether two file names are not equal.
Public operatorStatic memberInequality(FileName, String) Determines whether a file name and a string path are not equal.
Obsolete
Public operatorStatic memberInequality(String, FileName) Determines whether a string path and a file name are not equal.
Obsolete
Top
See Also