mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-22 19:10:41 -10:00
Commit migrated from https://github.com/dotnet/corefx/commit/7cad8486cbabbce0236bdf530e30db7036335524
30 lines
976 B
C#
30 lines
976 B
C#
// Licensed to the .NET Foundation under one or more agreements.
|
|
// The .NET Foundation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace System.IO.Tests
|
|
{
|
|
public abstract class FileSystemTest : FileCleanupTestBase
|
|
{
|
|
public static readonly byte[] TestBuffer = { 0xBA, 0x5E, 0xBA, 0x11, 0xF0, 0x07, 0xBA, 0x11 };
|
|
|
|
protected static bool CanCreateSymbolicLinks
|
|
{
|
|
get
|
|
{
|
|
var path = Path.GetTempFileName();
|
|
var linkPath = path + ".link";
|
|
var ret = MountHelper.CreateSymbolicLink(linkPath, path);
|
|
try { File.Delete(path); } catch { }
|
|
try { File.Delete(linkPath); } catch { }
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
[DllImport("libc", SetLastError = true)]
|
|
protected static extern int geteuid();
|
|
}
|
|
}
|