Description
On Linux systems, DriveInfo.DriveFormat changes to return Linux kernel filesystem type strings. These strings represent a more granular representation of the filesystem type than the previous implementation. For example: it is possible to distinguish between ext3 and ext4.
Version
.NET 10 Preview 6
Previous behavior
.NET returned a string representation by mapping magic constants to strings. Because several different filesystem types use the same magic constants, it was not possible to distinguish between them.
New behavior
.NET returns the string representation used by the Linux kernel for the filesystem type.
Type of breaking change
Reason for change
Provide more granular filesystem type information.
Recommended action
Check and update usages of System.IO.DriveInfo.DriveFormat to include the Linux filesystem type strings. On a Linux system, the type strings of the drives can be read from the /proc/self/mountinfo file. On each line, the filesystem type string is the first field after the --separator.
For cgroup file systems, DriveFormat changes from cgroupfs/cgroup2fs to cgroup/cgroups. For the SELinux filesystem the value changes from selinux to selinuxfs.
Feature area
Core .NET libraries
Affected APIs
System.IO.DriveInfo.DriveFormat
Associated WorkItem - 444450
Description
On Linux systems,
DriveInfo.DriveFormatchanges to return Linux kernel filesystem type strings. These strings represent a more granular representation of the filesystem type than the previous implementation. For example: it is possible to distinguish betweenext3andext4.Version
.NET 10 Preview 6
Previous behavior
.NET returned a string representation by mapping magic constants to strings. Because several different filesystem types use the same magic constants, it was not possible to distinguish between them.
New behavior
.NET returns the string representation used by the Linux kernel for the filesystem type.
Type of breaking change
Reason for change
Provide more granular filesystem type information.
Recommended action
Check and update usages of
System.IO.DriveInfo.DriveFormatto include the Linux filesystem type strings. On a Linux system, the type strings of the drives can be read from the/proc/self/mountinfofile. On each line, the filesystem type string is the first field after the--separator.For cgroup file systems,
DriveFormatchanges fromcgroupfs/cgroup2fstocgroup/cgroups. For the SELinux filesystem the value changes fromselinuxtoselinuxfs.Feature area
Core .NET libraries
Affected APIs
System.IO.DriveInfo.DriveFormatAssociated WorkItem - 444450