public
FileStore = map Path to File inv fileStore ==
<Root> insetdom fileStore and forall path insetdom fileStore & let parent = dirName(path) in
parent insetdom fileStore and
isDirectory(fileStore(parent));
public
File :: attributes : Attributes
contents : [FileContents] inv file ==
(file.attributes.fileType = <Directory> and file.contents = nil) or
(file.attributes.fileType = <RegularFile> and file.contents <> nil);
public
Attributes :: fileType : FileType;
public
FileType = <RegularFile> | <Directory>;
public
OpenFileDescriptorTable = map FileHandler to OpenFileDescriptor;
public
FileHandler = nat;
public
OpenFileDescriptor ::
path : Path;
public System :: table : OpenFileDescriptorTable
fileStore : FileStore inv sys == forall openfiledescriptor insetrng sys.table &
openfiledescriptor.path insetdom sys.fileStore;
functions
public
FS_DeleteFileDir_Main : System * Path -> System * FFS_Status
FS_DeleteFileDir_Main(sys, full_path) == ifnot isRoot(full_path) and
isElemFileStore(full_path, sys.fileStore) and
pre_FS_DeleteFileDir_System(sys, full_path) then mk_(FS_DeleteFileDir_System(sys, full_path), <FFS_StatusSuccess>) else mk_(sys, FS_DeleteFileDir_Exception(sys, full_path));
private
FS_DeleteFileDir_System : System * Path -> System
FS_DeleteFileDir_System(sys, full_path) == mu(sys, fileStore |-> FS_DeleteFileDir_FileStore(sys.fileStore, full_path)) pre pre_FS_DeleteFileDir_FileStore(sys.fileStore, full_path) and forall buffer insetrng sys.table & buffer.path <> full_path;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.