[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
PrologFileAttrib

(Prolog) fileattrib

Clause to set a files attributes.

% This code saves data to a file
% and sets the file attributes to read-only
%
% Therefore, it will only run successfuly once.
DOMAINS
intList = integer*
FACTS
fact1(integer,string,intList)
fact2(integer,string)
CONSTANTS
fa_rdonly = 0x01
CLAUSES
fact1(1,"fact1",[1,2,3]).
fact1(2,"fact2",[1,3]).
fact1(3,"fact2",[3,2,1]).
fact2(1,"one").
fact2(1,"one once more").
fact2(2,"two").
GOAL
  Name = "C:/Bilderbikkel/Bilderbikkel.txt",
  save(Name),
  fileattrib(Name,fa_rdonly).


Code links



last edited (October 24, 2006) by bilderbikkel, Number of views: 443, Current Rev: 1

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.