ess.nextcloud

Main description of this module is not written yet

class ess.nextcloud.nextcloud(username=None)[source]

Class to simplify the connection to the ESS Nextcloud instance

The class use webdav to connect, and transfers files to a temporary folder which is deleted on exit.

Authors:
  • Yngve Levinsen

  • Emanuele Laface (original idea)

connect()[source]

Connect to the server.

This must be called after a new class has been initialized.

get_filelist(filepath='.')[source]

Lists files in a folder

Parameters

filepath (str) – path to list of files from

Returns

list of files in filepath

Return type

list

get_filelist_glob(filepath)[source]

Lists files in a path which can include * (may match multiple folders)

Parameters

filepath (str) – glob file path to look for files in

Returns

list of all files that match the pattern

Return type

list

get_resource(filepath)[source]

Copy the file in filepath to a local temporary folder

Parameters

filepath – path to the file

Returns

full path to the local copy of the file

Return type

str