ice Slice语言 定义一个分布式文件系统

[入库:2005年8月19日] [更新:2007年3月24日]

本文简介:选择自 kkk3k3k 的 blog

//名称:远程文件系统
//


module filesystem
{
//-------------------数据类型--------------------------------------------------------
 sequence<byte> rfsstream;//文件读写系列
 struct rfsnode
 {
     string name;//文件或者目录的名称
     bool   type;//1=文件 0= 目录
 };   
 sequence<rfsnode> rfsnodelist;//文件目录列表
 
//------------------异常处理----------------------------------------------------------
    exception rfserror
    {
     string reason;
    };
//------------------接口实现----------------------------------------------------------
    interface rfsfilesystem
    {           //_________用户标识______文件名称_______要读写的块 ______读写的内容_________异常处理   
       
       void fileread  (string userid,string filename,int blockno,out rfsstream fstream) throws rfserror;
       
       void filewrite (string userid,string filename,int blockno,    rfsstream fstream) throws rfserror;       
   
       void filedel   (string userid,string filename)  throws rfserror;      
                                                 
       void filerename(string userid,string filename,string newname ) throws rfserror;
       
       void filecopy  (string userid,string filename,string newname ) throws rfserror;
       
       void filemove  (string userid,string filename,string newname ) throws rfserror;
       
       
       void dircreate (string userid,string dirname )                 throws rfserror;
       
       void dirdel    (string userid,string dirname )                 throws rfserror;
       
       void dirrename (string userid,string dirname ,string newname)  throws rfserror;
     
       void dirmove   (string userid,string dirname ,string newname)  throws rfserror;

 void dirlist   (string userid,string dirname ,out rfsnodelist dflist)  throws rfserror;
      
       string login   (string username,string password);
    };
//----------------------------------------------------------------------------
   

   
};

本文关键:ice Slice语言 定义一个分布式文件系统
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top