Table of Contents Previous Next
Logo
Slice for a Simple File System : 5.4 The Complete Definition
Copyright © 2003-2008 ZeroC, Inc.

5.4 The Complete Definition

We wrap our definitions in a module, resulting in the final definition as follows:
module Filesystem { 
    interface Node { 
        idempotent string name(); 
    }; 
 
    exception GenericError { 
        string reason; 
    }; 

    sequence<string> Lines; 
 
    interface File extends Node { 
        idempotent Lines read(); 
        idempotent void write(Lines text) throws GenericError; 
    }; 
 
    sequence<Node*> NodeSeq; 
 
    interface Directory extends Node { 
        idempotent NodeSeq list(); 
    }; 
}; 
 
Table of Contents Previous Next
Logo