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 FileManager.FileManager(system, config, m_type=None)¶
This is the abstract interface that a <no title> object can interact with to work with the files or file-like objects on the system.
Parameters:
system: the <no title> object connecting to the target system
config: the <no title> object defining this user
m_type: optionally a string overriding any value in config to determine the type of FileManager to create
- copy_selected()¶
Copy any fils that are currently selected.
- cut_selected()¶
Cut any fils that are currently selected.
- delete_selected()¶
Delete any fils that are currently selected.
Navigate the browser to the given path, which should be a folder or directory or similar container object.
Parameters:
path: the string path to navigate the FileManager to
Examples:
user.FileManager.navigate_to( r”windowssystem32” )
user.FileManager.navigate_to( “/usr/local/bin” )
- paste()¶
Paste any object previously copyied or cut (or deleted depending on the implementing file manager.
- select_files(files)¶
Select a set of files that are visisble in the current directory.
Parameters:
files: a list of strings containing the displayed names of files to select, if only a single file is to be selected it can be passed as a string not a list
Return: the number of files seeminly selected
Examples:
user.FileManager.select_files( “explorer.exe” )
user.FileManager.select_files( [ ‘bc’, ‘vim’, ‘awk’ ] )