顯示具有 GAPFS 標籤的文章。 顯示所有文章
顯示具有 GAPFS 標籤的文章。 顯示所有文章

2010年4月1日 星期四

PATH 的討論

1. gap 並沒有實際的 file, 這是個方法 gap file => Path, 但java的File有太多features是我要當做一個GAP DM file所不須要的, 為了單純化,就不用它了

2.

Method Summary
int compareTo(java.lang.Object o)
Compare this object to another object
boolean equals(java.lang.Object o)
Compare if this object is equal to another object
java.lang.String getGroup()
Get the group associated with the file.
long getLen()
java.sql.Timestamp getModificationTime()
Get the modification time of the file.
java.lang.String getOwner()
Get the owner of the file.
java.lang.String getParentID()
net.asgc.gap.dm.fs.Path getPath()
Get the file abosolute path
java.lang.String getPhysicalPath()
java.lang.String getSEHost()
java.lang.String getSEType()
java.lang.String getUID()
int hashCode()
Returns a hash code value for the object, which is defined as the hash code of the path name.
boolean isDir()
Is this a directory?
void setGroup(java.lang.String group)
Sets group.
void setLen(long length)
void setModificationTime(java.sql.Timestamp dt)
void setOwner(java.lang.String owner)
Sets owner.
void setParentID(java.lang.String pID)
void setPath(net.asgc.gap.dm.fs.Path p)
void setPhysicalPath(java.lang.String surl)
void setSEHost(java.lang.String sh)
void setSEType(java.lang.String st)

File System Discuss

1. File system 提供方法給使用者, 隱藏了底層的 mataserver 和 driver

2. 目前方法

Method Summary
void create(java.lang.String type, java.io.File src, net.asgc.gap.dm.fs.Path destFile)
Upload a local file object to GAP DM, and should assign a storage type(Driver) to upload
java.io.OutputStream create(java.lang.String type, net.asgc.gap.dm.fs.Path destFile)
Create (Upload) a file to GAP file system
void create(net.asgc.gap.dm.fs.UploadBeen destFileSet)
Create (upload) file list to GAP file system
net.asgc.gap.dm.fs.driver.Driver getDriver(java.lang.String type)
Get driver by key
net.asgc.gap.dm.fs.FileStatus getFileStatus(net.asgc.gap.dm.fs.Path p)
Get the metadata for a file
net.asgc.gap.dm.fs.FileStatus getTempStatus()
net.asgc.gap.dm.fs.Path getWorkingDir()
net.asgc.gap.dm.fs.FileStatus[] listStatus(net.asgc.gap.dm.fs.Path p)
Get metadata of all directories and files under a directory
static void main(java.lang.String[] args)
boolean mkdirs(net.asgc.gap.dm.fs.Path f)
create a directory
java.io.InputStream open(net.asgc.gap.dm.fs.Path srcDMPath)
Open (Download) a file from GAP file system
void open(net.asgc.gap.dm.fs.Path srcDMPath, net.asgc.gap.dm.fs.Path dest)
void refreshTempStatus()
boolean rename(net.asgc.gap.dm.fs.Path src, net.asgc.gap.dm.fs.Path dst)
boolean setFileStatus(net.asgc.gap.dm.fs.Path destDMPath, net.asgc.gap.dm.fs.FileStatus status)
Set(Create) the metadata for a file
void setWorkingDir(net.asgc.gap.dm.fs.Path workingDir)
boolean updateFileStatus(net.asgc.gap.dm.fs.FileStatus status)
Update the metadata for a file