public class CmsJlanNetworkFile
extends org.alfresco.jlan.server.filesys.NetworkFile
ATTRIBUTESONLY, Created, DelayedClose, DelayedWriteError, DeleteOnClose, IOPending, m_accessDate, m_allowedAccess, m_attrib, m_closed, m_createDate, m_dirId, m_fid, m_fileSize, m_fullName, m_grantedAccess, m_modifyDate, m_name, m_streamId, m_streamName, m_uniqueId, m_writeCount, READONLY, READWRITE, WRITEONLY
构造器和说明 |
---|
CmsJlanNetworkFile(CmsObjectWrapper cms,
CmsResource resource,
java.lang.String fullName)
Creates a new network file instance.
|
限定符和类型 | 方法和说明 |
---|---|
void |
closeFile() |
void |
delete() |
protected void |
ensureLock()
Make sure that this resource is locked.
|
void |
flushFile() |
protected CmsFile |
getFile()
Gets the CmsFile instance for this file, or null if the file contents haven'T been loaded already.
|
org.alfresco.jlan.server.filesys.FileInfo |
getFileInfo()
Gets the file information record.
|
protected java.lang.String |
getFullChildPath(CmsResource child)
Adds the name of a child resource to this file's path.
|
protected void |
load(boolean needContent)
Loads the file data from the VFS.
|
protected boolean |
matchesSearchAttributes(int attributes)
Checks if this file matches the given search attributes.
|
void |
moveTo(java.lang.String cmsNewPath)
Moves this file to a different path.
|
void |
openFile(boolean arg0) |
int |
readFile(byte[] buffer,
int length,
int bufferOffset,
long fileOffset) |
java.util.List<CmsJlanNetworkFile> |
search(java.lang.String name,
int searchAttributes)
Collects all files matching the given name pattern and search attributes.
|
long |
seekFile(long pos,
int typ) |
void |
setFileInformation(org.alfresco.jlan.server.filesys.FileInfo info)
Sets the file information.
|
void |
truncateFile(long size) |
protected void |
updateFromResource()
Copies state information from the internal CmsResource object to this object.
|
void |
writeFile(byte[] data,
int len,
int pos,
long offset) |
addLock, allowsOpenCloseViaNetworkFile, close, getAccessDate, getAccessToken, getAllowedAccess, getCreationDate, getDirectoryId, getFileAttributes, getFileId, getFileSize, getFileSizeInt, getFullName, getFullNameStream, getGrantedAccess, getGrantedAccessAsString, getLockAt, getLockList, getModifyDate, getName, getOpLock, getProtocolId, getStreamId, getStreamName, getUniqueId, getWriteCount, hasAccessDate, hasAccessToken, hasCreationDate, hasDelayedClose, hasDelayedWriteError, hasDeleteOnClose, hasIOPending, hasLocks, hasModifyDate, hasNTAttribute, hasOpLock, incrementWriteCount, isArchived, isClosed, isDirectory, isForce, isHidden, isReadOnly, isStream, isSystem, numberOfLocks, removeAllLocks, removeLock, setAccessDate, setAccessToken, setAllowedAccess, setAttributes, setClosed, setCreationDate, setDelayedClose, setDelayedWriteError, setDeleteOnClose, setDirectoryId, setFileId, setFileSize, setFileSize, setForce, setFullName, setGrantedAccess, setIOPending, setModifyDate, setName, setOpLock, setProtocolId, setStatusFlag, setStreamId, setStreamName, setUniqueId, setUniqueId, setUniqueId, toString, wasCreated
public CmsJlanNetworkFile(CmsObjectWrapper cms, CmsResource resource, java.lang.String fullName)
cms
- the CMS object wrapper to useresource
- the actual CMS resourcefullName
- the raw repository pathpublic void closeFile() throws java.io.IOException
closeFile
在类中 org.alfresco.jlan.server.filesys.NetworkFile
java.io.IOException
NetworkFile.closeFile()
public void delete() throws java.io.IOException
java.io.IOException
public void flushFile() throws java.io.IOException
flushFile
在类中 org.alfresco.jlan.server.filesys.NetworkFile
java.io.IOException
NetworkFile.flushFile()
public org.alfresco.jlan.server.filesys.FileInfo getFileInfo() throws java.io.IOException
java.io.IOException
- if reading the file information failspublic void moveTo(java.lang.String cmsNewPath) throws CmsException
cmsNewPath
- the new pathCmsException
- if something goes wrongpublic void openFile(boolean arg0)
openFile
在类中 org.alfresco.jlan.server.filesys.NetworkFile
NetworkFile.openFile(boolean)
public int readFile(byte[] buffer, int length, int bufferOffset, long fileOffset) throws java.io.IOException
readFile
在类中 org.alfresco.jlan.server.filesys.NetworkFile
java.io.IOException
NetworkFile.readFile(byte[], int, int, long)
public java.util.List<CmsJlanNetworkFile> search(java.lang.String name, int searchAttributes) throws java.io.IOException
name
- the name patternsearchAttributes
- the search attributesjava.io.IOException
- if something goes wrongpublic long seekFile(long pos, int typ) throws java.io.IOException
seekFile
在类中 org.alfresco.jlan.server.filesys.NetworkFile
java.io.IOException
NetworkFile.seekFile(long, int)
public void setFileInformation(org.alfresco.jlan.server.filesys.FileInfo info)
info
- the file information to setpublic void truncateFile(long size) throws java.io.IOException
truncateFile
在类中 org.alfresco.jlan.server.filesys.NetworkFile
java.io.IOException
NetworkFile.truncateFile(long)
public void writeFile(byte[] data, int len, int pos, long offset) throws java.io.IOException
writeFile
在类中 org.alfresco.jlan.server.filesys.NetworkFile
java.io.IOException
NetworkFile.writeFile(byte[], int, int, long)
protected void ensureLock() throws CmsException
CmsException
protected CmsFile getFile()
protected java.lang.String getFullChildPath(CmsResource child)
child
- the child resourceprotected void load(boolean needContent) throws java.io.IOException, CmsException
needContent
- true if we need the file content to be loadedjava.io.IOException
- if an IO error happensCmsException
- if a CMS operation failsprotected boolean matchesSearchAttributes(int attributes)
attributes
- the search attributesprotected void updateFromResource()