//名称:远程文件系统
//
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);
};
//----------------------------------------------------------------------------
};