summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRahul Kumar <rahku@microsoft.com>2016-11-14 10:17:28 -0800
committerGitHub <noreply@github.com>2016-11-14 10:17:28 -0800
commitd67e1627158ff5c973b21faf9fd03ebbb49f4679 (patch)
treec847979f90102eac243dc2562f82e7e670a7e520 /src
parent32fa4911074bf95a30f7fa1828701fb920af91c6 (diff)
parentb654a3dd2a8dc0190257dd326d651846cd6ce3b6 (diff)
downloadcoreclr-d67e1627158ff5c973b21faf9fd03ebbb49f4679.tar.gz
coreclr-d67e1627158ff5c973b21faf9fd03ebbb49f4679.tar.bz2
coreclr-d67e1627158ff5c973b21faf9fd03ebbb49f4679.zip
Merge pull request #8100 from rahku/reflection
Expose Assembly::GetFile(s) apis
Diffstat (limited to 'src')
-rw-r--r--src/mscorlib/model.xml3
-rw-r--r--src/mscorlib/ref/mscorlib.cs82
2 files changed, 85 insertions, 0 deletions
diff --git a/src/mscorlib/model.xml b/src/mscorlib/model.xml
index d43dd574d1..1e041a8102 100644
--- a/src/mscorlib/model.xml
+++ b/src/mscorlib/model.xml
@@ -3975,6 +3975,9 @@
<Member Name="GetExecutingAssembly" />
<Member Name="GetEntryAssembly" />
<Member Name="GetExportedTypes" />
+ <Member Name="GetFile(System.String)" />
+ <Member Name="GetFiles" />
+ <Member Name="GetFiles(System.Boolean)" />
<Member Name="GetLoadedModules" />
<Member Name="GetLoadedModules(System.Boolean)" />
<Member Name="GetManifestResourceNames" />
diff --git a/src/mscorlib/ref/mscorlib.cs b/src/mscorlib/ref/mscorlib.cs
index f63433e0b4..b7a039df50 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<int> 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
{
@@ -7265,6 +7344,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; }