Question: Create a python thread - safe Class that uploads a file from the local machine to a remote LINUX machine using Paramiko & SFTP .
Create a python threadsafe Class that uploads a file from the local machine to a remote LINUX machine using Paramiko & SFTP Create a lock to ensure that local file is unchanged during upload process to LINUX machine.
The constructor should take arguments to connect to the LINUX machine and have a private variable that allows python to lock the file.
The class should have a method that takes string argument of local path to file. This method should lock the file, upload the file, then remove the lock on the file.
You are not required to run or test this class. Just the class definition is needed.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
