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

Class FileNode

source code

object --+    
         |    
  Resource --+
             |
            FileNode

A File Node Resource.

Instance Methods [hide private]
 
set_public(self, public=True)
Set the file public.
source code
 
move(self, new_path)
Move this node to a new path.
source code
 
download(self, destination=None)
Download this file.
source code

Inherited from Resource: __init__, delete, load

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]

set_public(self, public=True)

source code 

Set the file public.

Parameters:
  • public - If True the file will be published else it will be unpublished. Defaults to True.

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.

download(self, destination=None)

source code 

Download this file.

Parameters:
  • destination - The local directory to download the file to.