Esempio n. 1
0
 /// <summary>
 /// Pass the file handle to the <see cref="System.IO.FileStream"/> constructor.
 /// The <see cref="System.IO.FileStream"/> will close the handle.
 /// </summary>
 public SafeFileHandle CreateHandle(
     CreationDisposition creationDisposition,
     FileAccess fileAccess,
     FileShare fileShare)
 {
     return(ZlpIOHelper.CreateFileHandle(_path, creationDisposition, fileAccess, fileShare));
 }
Esempio n. 2
0
 public System.IO.FileStream OpenWrite()
 {
     return(new System.IO.FileStream(
                ZlpIOHelper.CreateFileHandle(
                    _path,
                    CreationDisposition.OpenAlways,
                    FileAccess.GenericRead | FileAccess.GenericWrite,
                    FileShare.Read | FileShare.Write),
                System.IO.FileAccess.ReadWrite));
 }
Esempio n. 3
0
 public System.IO.FileStream OpenRead()
 {
     return(new System.IO.FileStream(
                ZlpIOHelper.CreateFileHandle(
                    FullName,
                    CreationDisposition.OpenAlways,
                    FileAccess.GenericRead,
                    FileShare.Read),
                System.IO.FileAccess.Read));
 }