2 writes to _handle
mscorlib (2)
system\io\filestream.cs (2)
845
_handle
= Win32Native.SafeCreateFile(tempPath, fAccess, share, secAttrs, mode, flagsAndAttributes, IntPtr.Zero);
1015
_handle
= handle;
60 references to _handle
mscorlib (60)
system\io\filestream.cs (60)
847
if (
_handle
.IsInvalid) {
893
int fileType = Win32Native.GetFileType(
_handle
);
895
_handle
.Close();
913
b = ThreadPool.BindHandle(
_handle
);
920
_handle
.Close();
1024
int handleType = Win32Native.GetFileType(
_handle
);
1050
b = ThreadPool.BindHandle(
_handle
);
1142
r = ReadFileNative(
_handle
, bytes, 0, 0, null, out hr);
1145
r = WriteFileNative(
_handle
, bytes, 0, 0, null, out hr);
1177
if (
_handle
.IsClosed) __Error.FileNotOpen();
1181
lo = Win32Native.GetFileSize(
_handle
, out hi);
1224
if (
_handle
.IsClosed) __Error.FileNotOpen();
1254
if (
_handle
.IsClosed) __Error.FileNotOpen();
1255
return new FileSecurity(
_handle
, _fileName, AccessControlSections.Access | AccessControlSections.Owner | AccessControlSections.Group);
1265
if (
_handle
.IsClosed) __Error.FileNotOpen();
1267
fileSecurity.Persist(
_handle
, _fileName);
1281
if (
_handle
!= null && !
_handle
.IsClosed) {
1293
if (
_handle
!= null && !
_handle
.IsClosed)
1294
_handle
.Dispose();
1310
if (
_handle
!= null) {
1311
BCLDebug.Correctness(
_handle
.IsClosed, "You didn't close a FileStream & it got finalized. Name: \""+_fileName+"\"");
1325
if (
_handle
.IsClosed) __Error.FileNotOpen();
1350
if (!Win32Native.FlushFileBuffers(
_handle
))
1420
return
_handle
.DangerousGetHandle();
1438
return
_handle
;
1449
if (
_handle
.IsClosed) __Error.FileNotOpen();
1481
if (!Win32Native.SetEndOfFile(
_handle
)) {
1508
if (
_handle
.IsClosed) __Error.FileNotOpen();
1570
Contract.Assert(!
_handle
.IsClosed, "!_handle.IsClosed");
1589
int r = ReadFileNative(
_handle
, buffer, offset, count, null, out hr);
1613
if (
_handle
.IsClosed) __Error.FileNotOpen();
1691
Contract.Assert(!
_handle
.IsClosed && CanSeek, "!_handle.IsClosed && CanSeek");
1696
ret = Win32Native.SetFilePointer(
_handle
, offset, origin, out hr);
1717
_handle
.Dispose();
1762
if (
_handle
.IsClosed) __Error.FileNotOpen();
1826
Contract.Assert(!
_handle
.IsClosed, "!_handle.IsClosed");
1846
int r = WriteFileNative(
_handle
, buffer, offset, count, null, out hr);
1882
if (
_handle
.IsClosed) __Error.FileNotOpen();
2012
Contract.Assert(!
_handle
.IsClosed, "!_handle.IsClosed");
2026
FileStreamAsyncResult asyncResult = new FileStreamAsyncResult(numBufferedBytesRead, bytes,
_handle
, userCallback, stateObject, false);
2066
int r = ReadFileNative(
_handle
, bytes, offset, numBytes, intOverlapped, out hr);
2091
if (!
_handle
.IsClosed && CanSeek) // Update Position - It could be anywhere.
2161
if (
_handle
.IsClosed) __Error.FileNotOpen();
2194
if (
_handle
.IsClosed) __Error.FileNotOpen();
2272
Contract.Assert(!
_handle
.IsClosed, "!_handle.IsClosed");
2281
FileStreamAsyncResult asyncResult = new FileStreamAsyncResult(0, bytes,
_handle
, userCallback, stateObject, true);
2325
int r = WriteFileNative(
_handle
, bytes, offset, numBytes, intOverlapped, out hr);
2348
if (!
_handle
.IsClosed && CanSeek) // Update Position - It could be anywhere.
2416
if (
_handle
.IsClosed) __Error.FileNotOpen();
2437
if (
_handle
.IsClosed) __Error.FileNotOpen();
2444
if (!Win32Native.LockFile(
_handle
, positionLow, positionHigh, lengthLow, lengthHigh))
2453
if (
_handle
.IsClosed) __Error.FileNotOpen();
2460
if (!Win32Native.UnlockFile(
_handle
, positionLow, positionHigh, lengthLow, lengthHigh))
2532
_handle
.Dispose();
2589
_handle
.Dispose();
2625
if (
_handle
.IsClosed)
2677
if (
_handle
.IsClosed)
2840
if (
_handle
.IsClosed)