Constructor and Description |
---|
FileBranch(File dir)
Constructs a branch from a File object representing an existing
directory.
|
Modifier and Type | Method and Description |
---|---|
Node |
createNode(String location)
Attempts to construct a new node in the context of this one.
|
Node[] |
getChildren()
Returns the array of child nodes belonging to this branch.
|
boolean |
isHidingEnabled()
Indicates whether files marked as hidden by the default FileSystemView
are shown or not.
|
void |
setHidingEnabled(boolean hiding)
Sets whether files marked as hidden by the default FileSystemView
are shown or not.
|
createNode, equals, getFile, getName, getParent, hashCode, toString
public FileBranch(File dir)
dir
- directoryIllegalArgumentException
- if dir
is not a directorypublic Node[] getChildren()
Branch
getChildren
in interface Branch
public Node createNode(String location)
Branch
Leaf.getOutputStream()
call may do so.
The returned node will typically be a child of this branch,
but need not be, for instance if name
is interpreted as an
absolute path.
If the named node cannot be created, null
may be returned.
createNode
in interface Branch
location
- name of a node in the context of this branchpublic boolean isHidingEnabled()
public void setHidingEnabled(boolean hiding)
hiding
- true to hide hidden filesCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.