We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a483c99 commit ea09b7cCopy full SHA for ea09b7c
General/basic_operation.py
@@ -11,6 +11,7 @@ def list_to_file(input_list,output_file):
11
def file_to_list(input_file):
12
def get_file_details(input_file):
13
def file_string_replace(input_file):
14
+def check_file(input_file):
15
'''
16
17
#Remove Duplicates from list - Input (ipaddress)1 | Output (status)1
@@ -90,4 +91,11 @@ def file_string_replace(input_file):
90
91
f2=open(input_file,"w+")
92
f2.write(input)
93
f1.close()
- f2.close()
94
+ f2.close()
95
+
96
+#Check file and exist and file is not empty - Input (filename)1 | Output(status)
97
98
+ status=False
99
+ if os.path.isfile(input_file) and os.path.getsize(input_file) > 0:
100
+ status=True
101
+ return status
0 commit comments