Package omero.grid.monitors
Interface _FileServerOperationsNC
-
- All Known Subinterfaces:
FileServer
- All Known Implementing Classes:
_FileServerDisp
,_FileServerTie
public interface _FileServerOperationsNC
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
fileExists(java.lang.String fileId)
Query the existence of a file An exception will be raised if the method fails to determine the existence.float
getATime(java.lang.String fileId)
Get atime of a file An exception will be raised if the file no longer exists or is inaccessible.java.lang.String
getBaseName(java.lang.String fileId)
Get base name of a file, this is the name stripped of any path, e.g.FileStats[]
getBulkDirectory(java.lang.String absPath, java.lang.String filter)
Get an absolute directory from an OMERO.fs server.float
getCTime(java.lang.String fileId)
Get ctime of a file An exception will be raised if the file no longer exists or is inaccessible.java.lang.String[]
getDirectory(java.lang.String absPath, java.lang.String filter)
Get an absolute directory from an OMERO.fs server.float
getMTime(java.lang.String fileId)
Get mtime of a file An exception will be raised if the file no longer exists or is inaccessible.java.lang.String
getOwner(java.lang.String fileId)
Get owner of a file An exception will be raised if the file no longer exists or is inaccessible.java.lang.String
getSHA1(java.lang.String fileId)
Get SHA1 of a file An exception will be raised if the file no longer exists or is inaccessible.long
getSize(java.lang.String fileId)
Get size of a file in bytes An exception will be raised if the file no longer exists or is inaccessible.FileStats
getStats(java.lang.String fileId)
Get all FileStats of a file An exception will be raised if the file no longer exists or is inaccessible.boolean
isDir(java.lang.String fileId)
Query whether file is a directory An exception will be raised if the file no longer exists or is inaccessible.boolean
isFile(java.lang.String fileId)
Query whether file is a file An exception will be raised if the file no longer exists or is inaccessible.byte[]
readBlock(java.lang.String fileId, long offset, int size)
readBlock should open, read size bytes from offset and then close the file.
-
-
-
Method Detail
-
getDirectory
java.lang.String[] getDirectory(java.lang.String absPath, java.lang.String filter) throws OmeroFSError
Get an absolute directory from an OMERO.fs server. The returned list will contain just the file names for each directory entry. An exception will be raised if the path does not exist or is inaccessible to the OMERO.fs server. An exception will be raised if directory list cannot be returned for any other reason.- Parameters:
absPath
- an absolute path on the monitor's watch path (string).filter
- a filter to apply to the listing, cf. ls (string).- Returns:
- a directory listing (Ice::StringSeq).
- Throws:
OmeroFSError
-
getBulkDirectory
FileStats[] getBulkDirectory(java.lang.String absPath, java.lang.String filter) throws OmeroFSError
Get an absolute directory from an OMERO.fs server. The returned list will contain the file stats for each directory entry. An exception will be raised if the path does not exist or is inaccessible to the OMERO.fs server. An exception will be raised if directory list cannot be returned for any other reason.- Parameters:
absPath
- an absolute path on the monitor's watch path (string).filter
- a filter to apply to the listing, cf. ls (string).- Returns:
- a directory listing (FileStatsList).
- Throws:
OmeroFSError
-
fileExists
boolean fileExists(java.lang.String fileId) throws OmeroFSError
Query the existence of a file An exception will be raised if the method fails to determine the existence.- Parameters:
fileId
- see above.- Returns:
- existence of file.
- Throws:
OmeroFSError
-
getBaseName
java.lang.String getBaseName(java.lang.String fileId) throws OmeroFSError
Get base name of a file, this is the name stripped of any path, e.g. file.ext An exception will be raised if the file no longer exists or is inaccessible.- Parameters:
fileId
- see above.- Returns:
- base name.
- Throws:
OmeroFSError
-
getStats
FileStats getStats(java.lang.String fileId) throws OmeroFSError
Get all FileStats of a file An exception will be raised if the file no longer exists or is inaccessible.- Parameters:
fileId
- see above.- Returns:
- file stats (FileStats).
- Throws:
OmeroFSError
-
getSize
long getSize(java.lang.String fileId) throws OmeroFSError
Get size of a file in bytes An exception will be raised if the file no longer exists or is inaccessible.- Parameters:
fileId
- see above.- Returns:
- byte size of file (long).
- Throws:
OmeroFSError
-
getOwner
java.lang.String getOwner(java.lang.String fileId) throws OmeroFSError
Get owner of a file An exception will be raised if the file no longer exists or is inaccessible.- Parameters:
fileId
- see above.- Returns:
- owner of file (string).
- Throws:
OmeroFSError
-
getCTime
float getCTime(java.lang.String fileId) throws OmeroFSError
Get ctime of a file An exception will be raised if the file no longer exists or is inaccessible.- Parameters:
fileId
- see above.- Returns:
- ctime of file (float).
- Throws:
OmeroFSError
-
getMTime
float getMTime(java.lang.String fileId) throws OmeroFSError
Get mtime of a file An exception will be raised if the file no longer exists or is inaccessible.- Parameters:
fileId
- see above.- Returns:
- mtime of file (float).
- Throws:
OmeroFSError
-
getATime
float getATime(java.lang.String fileId) throws OmeroFSError
Get atime of a file An exception will be raised if the file no longer exists or is inaccessible.- Parameters:
fileId
- see above.- Returns:
- atime of file (float).
- Throws:
OmeroFSError
-
isDir
boolean isDir(java.lang.String fileId) throws OmeroFSError
Query whether file is a directory An exception will be raised if the file no longer exists or is inaccessible.- Parameters:
fileId
- see above.- Returns:
- true is directory (bool).
- Throws:
OmeroFSError
-
isFile
boolean isFile(java.lang.String fileId) throws OmeroFSError
Query whether file is a file An exception will be raised if the file no longer exists or is inaccessible.- Parameters:
fileId
- see above.- Returns:
- true if file (bool).
- Throws:
OmeroFSError
-
getSHA1
java.lang.String getSHA1(java.lang.String fileId) throws OmeroFSError
Get SHA1 of a file An exception will be raised if the file no longer exists or is inaccessible. An exception will be raised if the SHA1 cannot be generated for any reason.- Parameters:
fileId
- see above.- Returns:
- SHA1 hex hash digest of file (string).
- Throws:
OmeroFSError
-
readBlock
byte[] readBlock(java.lang.String fileId, long offset, int size) throws OmeroFSError
readBlock should open, read size bytes from offset and then close the file. An exception will be raised if the file no longer exists or is inaccessible. An exception will be raised if the file read fails for any other reason.- Parameters:
fileId
- see above.offset
- byte offset into file from where read should begin (long).size
- number of bytes that should be read (int).- Returns:
- byte sequence of upto size bytes.
- Throws:
OmeroFSError
-
-