help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Procedures and functions] Reference for unit 'fileshare' (#powtils_main)

FileMarkWrite

Declaration

Source position: fileshare.pas line 23

function FileMarkWrite(

  const fname: String

):Boolean;

Notes

Marks a file for writing. Use this function when several people will be editing or modifying the same file at possibly the same time. This protects you from edit conflicts or damage to a file if multiple users try to write to the same file.

Example

begin
  FileMarkWrite('test.txt');
  // other people can not access the file and they wait until it is unlocked!
  // do work on the file here
  // ...
  FileUnmarkWrite('test.txt');
  // now others can access the file after unmarking
end.






lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505