[fpc-pascal] Does the system unit allow file locking/sharing?

Lars noreply at z505.com
Mon Jan 16 22:34:06 CET 2017


The oldschool way of opening files using the system unit (no sysutils) has
the filemode variable..

system.FileMode := fmOpenRead;
...
Assign(...
Rewrite(...


Can this be used with file locking/sharing OR-ed options like:
  fmShareCompat
  fmShareDenyNone
  fmShareDenyRead
  fmShareDenyWrite
  fmShareExclusive

Or does file locking/sharing require using sysutils unit with fileopen:
http://www.freepascal.org/docs-html/rtl/sysutils/fileopen.html

Thanx!



More information about the fpc-pascal mailing list