Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.Unlink.cs"
Link="Common\Interop\Unix\Interop.Unlink.cs" />
<Compile Include="$(CoreLibSharedDir)System\IO\DriveInfoInternal.Unix.cs"
Link="Common\System\IO\DriveInfoInternal.Unix.cs" />
Link="Common\System\IO\DriveInfoInternal.Unix.cs" Condition="'$(TargetsBrowser)' != 'true'" />
<Compile Include="$(CoreLibSharedDir)System\IO\DriveInfoInternal.Browser.cs"
Link="Common\System\IO\DriveInfoInternal.Browser.cs" Condition="'$(TargetsBrowser)' == 'true'" />
<Compile Include="$(CoreLibSharedDir)System\IO\PathInternal.Unix.cs"
Link="System\IO\PathInternal.Unix.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,8 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Globalization\GlobalizationMode.Unix.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Globalization\HijriCalendar.Unix.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Guid.Unix.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\IO\DriveInfoInternal.Unix.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\IO\DriveInfoInternal.Unix.cs" Condition="'$(TargetsBrowser)' != 'true'"/>
<Compile Include="$(MSBuildThisFileDirectory)System\IO\DriveInfoInternal.Browser.cs" Condition="'$(TargetsBrowser)' == 'true'"/>
<Compile Include="$(MSBuildThisFileDirectory)System\IO\FileStream.Lock.OSX.cs" Condition="'$(IsOSXLike)' == 'true'" />
<Compile Include="$(MSBuildThisFileDirectory)System\IO\FileStream.Lock.Unix.cs" Condition="'$(IsOSXLike)' != 'true'" />
<Compile Include="$(MSBuildThisFileDirectory)System\IO\FileStream.Unix.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.IO;

namespace System
{
public static partial class Environment
{
// Emscripten VFS mounts at / and is the only drive
public static string[] GetLogicalDrives() => new string[] { "/" };
public static string[] GetLogicalDrives() => DriveInfoInternal.GetLogicalDrives();

// In the mono runtime, this maps to gethostname, which returns 'emscripten'.
// Returning the value here allows us to exclude more of the runtime.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.IO
{
/// <summary>Contains internal volume helpers that are shared between many projects.</summary>
internal static partial class DriveInfoInternal
{
internal static string[] GetLogicalDrives() => new string[] { "/" };
}
}