mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
auto-t: add copy_to_ap utility
This commit is contained in:
parent
a472874890
commit
efe53e28c8
@ -1036,6 +1036,7 @@ class IWD(AsyncOpAbstract):
|
||||
def clear_storage(storage_dir=IWD_STORAGE_DIR):
|
||||
os.system('rm -rf ' + storage_dir + '/*')
|
||||
os.system('rm -rf ' + storage_dir + '/hotspot/*')
|
||||
os.system('rm -rf ' + storage_dir + '/ap/*')
|
||||
|
||||
@staticmethod
|
||||
def create_in_storage(file_name, file_content):
|
||||
@ -1063,6 +1064,13 @@ class IWD(AsyncOpAbstract):
|
||||
|
||||
shutil.copy(source, IWD_STORAGE_DIR + "/hotspot")
|
||||
|
||||
@staticmethod
|
||||
def copy_to_ap(source):
|
||||
if not os.path.exists(IWD_STORAGE_DIR + "/ap"):
|
||||
os.mkdir(IWD_STORAGE_DIR + "/ap")
|
||||
|
||||
IWD.copy_to_storage(source, IWD_STORAGE_DIR + '/ap/')
|
||||
|
||||
@staticmethod
|
||||
def remove_from_storage(file_name):
|
||||
os.system('rm -rf ' + IWD_STORAGE_DIR + '/\'' + file_name + '\'')
|
||||
|
Loading…
Reference in New Issue
Block a user