get_local_base_path

FunctionalityWrapper.get_local_base_path(anon=False)[source]

Returns the basepath on the local file system. Depending on anon the basepath is for the registered or anonymous user.

Parameters:
  • anon (bool) –
  • anon
    True:
    returns the local path to anon_root
    False:
    returns the local path to server_home
Returns:

base_path – Basepath on the local file system.

Return type:

str

Raises:

TypeError – If anon is not a bool

Examples

>>> ftpserver.get_local_base_path(anon=False))
/tmp/ftp_home_1rg7_i
>>> ftpserver.get_local_base_path(anon=True))
/tmp/anon_root_m6fknmyx