Package org.netxms.client.server
Class AgentFile
java.lang.Object
org.netxms.client.server.AgentFile
- All Implemented Interfaces:
RemoteFile
Represents information about file on remote system accessible via agent
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Get file extension.getGroup()
Get file modification time.getName()
Get file name.long
getOwner()
long
getSize()
Get file size in bytes.int
getType()
boolean
Check if this file object represents directory.boolean
Check if this file object is a placeholder (does not correspond to actual remote file).void
removeChild
(AgentFile child) void
setAccessRights
(String accessRights) void
setChildren
(List<AgentFile> children) void
setFileInfo
(AgentFileInfo info) void
void
void
void
-
Field Details
-
FILE
public static final int FILE- See Also:
-
DIRECTORY
public static final int DIRECTORY- See Also:
-
SYMBOLYC_LINK
public static final int SYMBOLYC_LINK- See Also:
-
PLACEHOLDER
public static final int PLACEHOLDER- See Also:
-
-
Constructor Details
-
AgentFile
Create server file object from NXCP message.- Parameters:
msg
- NXCP messagebaseId
- base variable IDparent
- parent file for this filenodeId
- source node of file
-
AgentFile
Constructor for AgentFile- Parameters:
name
- file namefileType
- file typeparent
- parent file for this filenodeId
- source node of file
-
AgentFile
Copy constructor for agent file- Parameters:
src
- AgentFile to copy
-
-
Method Details
-
isDirectory
public boolean isDirectory()Description copied from interface:RemoteFile
Check if this file object represents directory.- Specified by:
isDirectory
in interfaceRemoteFile
- Returns:
- true if this file object represents directory
- See Also:
-
isPlaceholder
public boolean isPlaceholder()Description copied from interface:RemoteFile
Check if this file object is a placeholder (does not correspond to actual remote file).- Specified by:
isPlaceholder
in interfaceRemoteFile
- Returns:
- true if this file object is a placeholder
- See Also:
-
getName
Description copied from interface:RemoteFile
Get file name.- Specified by:
getName
in interfaceRemoteFile
- Returns:
- file name
- See Also:
-
setName
- Parameters:
name
- the name to set
-
getSize
public long getSize()Description copied from interface:RemoteFile
Get file size in bytes.- Specified by:
getSize
in interfaceRemoteFile
- Returns:
- file size in bytes
- See Also:
-
getModificationTime
Description copied from interface:RemoteFile
Get file modification time.- Specified by:
getModificationTime
in interfaceRemoteFile
- Returns:
- file modification time
- See Also:
-
getExtension
Description copied from interface:RemoteFile
Get file extension.- Specified by:
getExtension
in interfaceRemoteFile
- Returns:
- file extension
- See Also:
-
getChildren
- Returns:
- the children
-
setChildren
- Parameters:
children
- the children to set
-
removeChild
- Parameters:
child
- to be removed
-
addChild
- Parameters:
child
- to be added
-
getFullName
- Returns:
- the fullName
-
getFilePath
- Returns:
- the fullName
-
getParent
- Returns:
- the parent
-
setParent
- Parameters:
parent
- the parent to set
-
getNodeId
public long getNodeId()- Returns:
- the nodeId
-
getType
public int getType()- Returns:
- the type
-
getOwner
- Returns:
- the owner
-
setOwner
- Parameters:
owner
- the owner to set
-
getGroup
- Returns:
- the group
-
setGroup
- Parameters:
group
- the group to set
-
getAccessRights
- Returns:
- the accessRights
-
setAccessRights
- Parameters:
accessRights
- the accessRights to set
-
setFileInfo
- Parameters:
info
- Set agent file info
-
getFileInfo
- Returns:
- Agent File Info
-