Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r2c475e06cf2d9f156b3853b547ddaec2ea102913 -rd91281a999d531ec87d575545b226e44dbae58a1 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 2c475e06cf2d9f156b3853b547ddaec2ea102913) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision d91281a999d531ec87d575545b226e44dbae58a1) @@ -21,8 +21,9 @@ CLOUD_CREDENTIALS_LOCATION = '/home/denali/Desktop/cloudsync/credentials' -CLOUD_SYNC_LOG_LOCATION = '/home/denali/Desktop/sd-card/cloudsync' +CLOUD_SYNC_LOG_LOCATION = '/home/denali/Desktop/sd-card/cloudsync/' + PEM_FILES = ['1.pem', '2.pem', '3.pem' ] @@ -48,5 +49,31 @@ test.log("Directory can not be created") +def get_cloud_sync_input_file(): + """ + This function is the handler for getting file from log folder. + Application log file is automatically created on '/home/denali/Desktop/sd-card/cloudsync/ {current_date}_inp.log' + @return latest_file - (string) returns latest file that append on log folder from sd-data + """ + try: + current_date = get_current_date_and_time(date_format = "%Y_%m_%d") + latest_file = CLOUD_SYNC_LOG_LOCATION+current_date+'_inp.buf' + return latest_file + except: + return False - + +def get_cloud_sync_output_file(): + """ + This function is the handler for getting file from log folder. + Application log file is automatically created on '/home/denali/Desktop/sd-card/cloudsync/ {current_date}_out.log' + @return latest_file - (string) returns latest file that append on log folder from sd-data + """ + try: + current_date = get_current_date_and_time(date_format = "%Y_%m_%d") + latest_file = CLOUD_SYNC_LOG_LOCATION+current_date+'_out.buf' + return latest_file + except: + return False + +