Package comodit_client :: Package api :: Module files :: Class HasFiles

Class HasFiles


Super class for entities having files.

Instance Methods
FileCollection
files(self)
Instantiates a collection of files.
 
add_file(self, f)
Adds a file to local list of files.
 
get_file(self, name)
Fetches a remote file entity given its name.

Inherited from entity.Entity: __init__, create, delete, dump, load, refresh, rename, show, update

Inherited from util.json_wrapper.JsonWrapper: dump_json, get_json, get_real_json, load_json, print_json, set_json

Inherited from object: __long__, __native__, __nonzero__, __unicode__, next

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

Properties
list of File files_f
The local list of files.

Inherited from entity.Entity: client, description, identifier, label, name, url, uuid

Inherited from object: __class__

Method Details

add_file(self, f)

 

Adds a file to local list of files. Note that this list is considered only at creation time. For later modifications, collection must be used.

Parameters:
  • f (File) - the file to add.

get_file(self, name)

 

Fetches a remote file entity given its name.

Parameters:
  • name (string) - The name of the file.

Property Details

files_f

The local list of files. The object of the list may be used to interact with server.

Get Method:
unreachable.files_f(self) - The local list of files.
Set Method:
unreachable.files_f(self, files) - Sets the list of files.
Type:
list of File