SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Reading a file which is locked by another process

Last post 10-01-2008 6:39 PM by JohnReilly. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-30-2008 3:29 PM

    • fabiob
    • Not Ranked
    • Joined on 09-30-2008
    • Posts 1

    Reading a file which is locked by another process

     Hello.

    I had a problem using FastZip to compress .log files that are written by another process.

     

    To solve the problem in FastZip.cs, line 492, i have changed the instruction:

    FileStream stream=File.OpenRead(e.Name)

    with:

    FileStream stream=File.Open(e.Name, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)

     

    In this way the file can be open even if the files is accessed in read/write by another process.

     

    A question: will you plan to insert that change in the next release?

     

    Thanks for the product,
    Fabio Borlenghi

  • 10-01-2008 6:39 PM In reply to

    Re: Reading a file which is locked by another process

    An answer: That would seem entirely reasonable :-)

     

    Cheers, -jr-

Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.