[plt-scheme] file lock

From: jos koot (jos.koot at telefonica.net)
Date: Tue Dec 19 14:24:06 EST 2006

Hi David Gurvich,
Thanks for responding. Working with copies is what I do. Saving I do by renaming: (rename-file-or-directory result-path original-path #t), which seems rather atomic to me. If the rename fails I have a backup and communicate this one to the user. There is a backup of the original file too, of course. Nevertheless, in MzScheme I cannot open a file that is open in MsWord, while with MsWord I can open a file while it open in an MzScheme program. MsWord realy locks its open files from being write-accessed by other applications. This would be rather convenient. But I cannot figure out how MsWord does this locking.
Greetings, Jos Koot 


----- Original Message ----- 
  From: David Gurvich 
  To: plt-scheme at list.cs.brown.edu 
  Sent: Tuesday, December 19, 2006 6:43 PM
  Subject: Re: [plt-scheme] file lock


  Different file access modes are determined by the underlying OS.  MSWord 
  actually works on copies of the file.  Emacs and vim both work on copies of 
  the file and save different versions, with names like file~ or #file#, if 
  multiple instances are being used or the program halts before saving.
  On Tuesday 19 December 2006 10:24, jos koot wrote:
  > Hi,
  > Is it possible to have PLT-scheme lock a file such as to prevent
  > simultaneous access from different stand allone programs? I looked around
  > in the docs, but could not find any related topic. I am sure it is possible
  > somehow, for MSWord can. Greetings, Jos Koot
  >
  > I use version full-369.1-bin-i386-win32.exe on Winsows XP home.

  -- 
  *--*--*--*--*--*--*--*--*--*--*--*
  KMail on Gentoo/PPC
  _________________________________________________
    For list-related administrative tasks:
    http://list.cs.brown.edu/mailman/listinfo/plt-scheme
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20061219/74f03905/attachment.html>

Posted on the users mailing list.