From b654a3dd2a8dc0190257dd326d651846cd6ce3b6 Mon Sep 17 00:00:00 2001 From: Rahul Kumar Date: Fri, 11 Nov 2016 12:10:16 -0800 Subject: [PATCH] Expose Assembly::GetFile(s) apis --- src/mscorlib/model.xml | 3 ++ src/mscorlib/ref/mscorlib.cs | 82 ++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) diff --git a/src/mscorlib/model.xml b/src/mscorlib/model.xml index 95284d5bf0..9fc52ed5eb 100644 --- a/src/mscorlib/model.xml +++ b/src/mscorlib/model.xml @@ -3973,6 +3973,9 @@ + + + diff --git a/src/mscorlib/ref/mscorlib.cs b/src/mscorlib/ref/mscorlib.cs index 1b6611c112..ade8a58360 100644 --- a/src/mscorlib/ref/mscorlib.cs +++ b/src/mscorlib/ref/mscorlib.cs @@ -57,6 +57,14 @@ namespace Microsoft.Win32.SafeHandles public override bool IsInvalid { [System.Security.SecurityCriticalAttribute]get { throw null; } } } [System.Security.SecurityCriticalAttribute] + public sealed partial class SafeFileHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid + { + public SafeFileHandle(System.IntPtr preexistingHandle, bool ownsHandle) : base(default(bool)) { } + public override bool IsInvalid { [System.Security.SecurityCriticalAttribute]get { throw null; } } + [System.Security.SecurityCriticalAttribute] + protected override bool ReleaseHandle() { throw null; } + } + [System.Security.SecurityCriticalAttribute] public abstract partial class SafeHandleMinusOneIsInvalid : System.Runtime.InteropServices.SafeHandle { protected SafeHandleMinusOneIsInvalid(bool ownsHandle) { } @@ -6696,6 +6704,15 @@ namespace System.IO public override string Message { get { throw null; } } public override string ToString() { throw null; } } + public enum FileMode + { + Append = 6, + Create = 2, + CreateNew = 1, + Open = 3, + OpenOrCreate = 4, + Truncate = 5, + } [System.Runtime.InteropServices.ComVisibleAttribute(true)] public partial class FileNotFoundException : System.IO.IOException { @@ -6710,6 +6727,68 @@ namespace System.IO public override string Message { get { throw null; } } public override string ToString() { throw null; } } + [System.FlagsAttribute] + public enum FileOptions + { + Asynchronous = 1073741824, + DeleteOnClose = 67108864, + Encrypted = 16384, + None = 0, + RandomAccess = 268435456, + SequentialScan = 134217728, + WriteThrough = -2147483648, + } + [System.FlagsAttribute] + public enum FileShare + { + Delete = 4, + Inheritable = 16, + None = 0, + Read = 1, + ReadWrite = 3, + Write = 2, + } + public partial class FileStream : System.IO.Stream + { + public FileStream(Microsoft.Win32.SafeHandles.SafeFileHandle handle, System.IO.FileAccess access) { } + public FileStream(Microsoft.Win32.SafeHandles.SafeFileHandle handle, System.IO.FileAccess access, int bufferSize) { } + public FileStream(Microsoft.Win32.SafeHandles.SafeFileHandle handle, System.IO.FileAccess access, int bufferSize, bool isAsync) { } + public FileStream(string path, System.IO.FileMode mode) { } + public FileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access) { } + public FileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) { } + public FileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize) { } + public FileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, bool useAsync) { } + public FileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, System.IO.FileOptions options) { } + public override bool CanRead { get { throw null; } } + public override bool CanSeek { get { throw null; } } + public override bool CanWrite { get { throw null; } } + [Obsolete("This property has been deprecated. Please use FileStream's SafeFileHandle property instead. http://go.microsoft.com/fwlink/?linkid=14202")] + public virtual System.IntPtr Handle { get { throw null; } } + public virtual bool IsAsync { get { throw null; } } + public override long Length { get { throw null; } } + public string Name { get { throw null; } } + public override long Position { get { throw null; } set { } } + public virtual Microsoft.Win32.SafeHandles.SafeFileHandle SafeFileHandle { get { throw null; } } + protected override void Dispose(bool disposing) { } + ~FileStream() { } + public override void Flush() { } + public virtual void Flush(bool flushToDisk) { } + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) { throw null; } + public override int Read(byte[] array, int offset, int count) { throw null; } + public override System.Threading.Tasks.Task ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } + public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state) { throw null; } + public override int EndRead(IAsyncResult asyncResult) { throw null; } + public virtual void Lock(long position, long length) { } + public override int ReadByte() { throw null; } + public override long Seek(long offset, System.IO.SeekOrigin origin) { throw null; } + public override void SetLength(long value) { } + public override void Write(byte[] array, int offset, int count) { } + public override System.Threading.Tasks.Task WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } + public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) { throw null; } + public override void EndWrite(IAsyncResult asyncResult) { } + public override void WriteByte(byte value) { } + public virtual void Unlock(long position, long length) { } + } [System.Runtime.InteropServices.ComVisibleAttribute(true)] public partial class IOException : System.SystemException { @@ -7264,6 +7343,9 @@ namespace System.Reflection [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)][System.Security.SecuritySafeCriticalAttribute] public static System.Reflection.Assembly GetExecutingAssembly() { throw null; } public virtual System.Type[] GetExportedTypes() { throw null; } + public virtual System.IO.FileStream GetFile(string name) { throw null; } + public virtual System.IO.FileStream[] GetFiles() { throw null; } + public virtual System.IO.FileStream[] GetFiles(bool getResourceModules) { throw null; } public override int GetHashCode() { throw null; } public System.Reflection.Module[] GetLoadedModules() { throw null; } public virtual System.Reflection.Module[] GetLoadedModules(bool getResourceModules) { throw null; } -- 2.34.1