Package u1rest :: Package files :: Module resources :: Class DirectoryNode
[hide private]
[frames] | no frames]

Class DirectoryNode

source code

object --+    
         |    
  Resource --+
             |
            DirectoryNode

Directory Node Resource.

Instance Methods [hide private]
 
__init__(self, res_json=None, user=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
make_file(self, name)
Make a file in this directory given a file name.
source code
 
make_directory(self, name)
Make a subdirectory in this directory given a directory name.
source code
 
load(self, with_children=False, cascade=False)
Reload this directory.
source code
 
move(self, new_path)
Move this node to a new path.
source code

Inherited from Resource: delete

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from Resource: resource_path

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, res_json=None, user=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

make_file(self, name)

source code 

Make a file in this directory given a file name.

Parameters:
  • name - The name of the file to be created under this path.

make_directory(self, name)

source code 

Make a subdirectory in this directory given a directory name.

Parameters:
  • name - The name of the directory to be created under this path.

load(self, with_children=False, cascade=False)

source code 

Reload this directory.

Parameters:
  • with_children - If True, direct children will be loaded into children.
  • cascade - If True all descendants of this node will be loaded into the children recursively. This should be used with caution.
Overrides: Resource.load

move(self, new_path)

source code 

Move this node to a new path.

Parameters:
  • new_path - The new path of the node. Note that this path is relative the volume path, so the volume path is not included. For example node.mode("/a/b/c") will move the node to a new path under the volume. Moving to a different volume is not permitted.