ibmfl.storage

Data Storage

class ibmfl.storage.data_store.DataStore[source]

File Storage

class ibmfl.storage.file_store.FileStore(base_location)[source]
clear(directory)[source]

delete all files of a specified fl sub directory

Parameters

directory – fl sub dir name to clear

create_dirs()[source]

create the fl directory and sub directories for object and file storage

dir_exists(fl_dir)[source]

check if a specified directory exists under the fl main directory

Parameters

fl_dir – directory name

Returns

location

get(location, filename)[source]

retrieve a specific file from a specific directory

Parameters
  • location – fl sub directory to look in

  • filename – file name to look for

Returns

path to file

get_latest(directory)[source]

retrieve the most recently generated from a specified directory

Parameters

directory – the fl sub directory to search in

Returns

path to file

list_directories()[source]

print the fl sub directories

list_files(directory)[source]

List all files in a specified directory

Parameters

directory – the fl sub directory to search in

Returns

all file paths

put(directory, data, user_file_name=None)[source]
Parameters
  • directory – the fl sub directory to search in

  • data – the data that is to be stored

  • user_file_name – an optional field for the user to specify the file name

Returns

path to file