ConsoleUser
Copyright (c) 2010-2023 Skaion Corporarion, www.skaion.com
This project was developed in part by numerous sponsorships from the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints of Governmental purposes notwithstanding any copyright notation thereon.
All content reflects those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government or Skaion Corporation.
- class FileSharingImpl.FileSharingImpl(system, config)¶
This class is an abstract parent for classes that want to implmement the <no title> interface for a <no title>. Much of the implementation for the functions can provided here, and subclasses will only have to customize for their their particular sites.
Parameters:
system: a <no title> object this <no title> is connected to
config: a <no title> object defining this user
- delete_selected()¶
Delete the currently selected file
- download(remote, local)¶
Download the remote path to the local path
Parameters:
remote: a string of the remote path to the file
local: a string of the local path to save the file to
Examples:
user.FileSharing.download(‘file1.txt’, r’c:tempfile1.txt’)
- download_selected(local_path)¶
Assuming an entry is currently selected, download it.
Parameters:
local_path: the string path on the client to save the downloaded file
- select(path)¶
Select the file at the remote path
Parameters:
path: the string by which we will know the remote file to select
- select_random()¶
Select a random file currently available
- upload(path)¶
Upload a file to the site
Parameters:
path: the string path to the local file to upload
- FileSharingImpl.get_file_sharing(system, config, s_type=None)¶
Get an instance of the correct implementor of the <no title> interface so a <no title> can interact with a specific site/tool.
Parameters:
system: a <no title> that the <no title> is connected to
config: a <no title> object defining this user
- s_type: an optional string that will define the type to load,
ignoring what the config object would do