Mono Class Library: Mono.Unix.UnixDriveInfo Overview | Members

Mono.Unix.UnixDriveInfo.MaximumFilenameLength Property

Gets the maximum filename length.

public long MaximumFilenameLength { get; }

Value

A long containing the maximum number of bytes that may make up a filename. This value varies from filesystem to filesystem.

Exceptions

TypeReason
InvalidOperationException There was an error retrieving the maximum filename length. The volume may not be mounted.

Remarks

The operating system does not specify an encoding for filenames, it just stores the bytes given to it. Since string is a UTF-16 string encoding, each character may require more than one byte to store in the filesystem. Consequently the maximum filename length can not be directly compared against string.Length.

Requirements

Namespace: Mono.Unix
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0