Add file exist utility
Resolves openbmc/openbmc-test-automation#580
Change-Id: Id309dbc321e62ff8ac28fe1e948bf77c7a66e404
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/syslib/utils_os.robot b/syslib/utils_os.robot
index 6dae469..ba4dc40 100755
--- a/syslib/utils_os.robot
+++ b/syslib/utils_os.robot
@@ -53,3 +53,14 @@
[Documentation] Power off host.
Run Key OBMC Boot Test \ REST Power Off
+
+File Exist On OS
+ [Documentation] Check if the given file path exist on OS.
+ [Arguments] ${file_path}
+ # Description of argument(s):
+ # file_path Absolute file path.
+
+ Login To OS
+ ${out}= Execute Command On OS ls ${file_path}
+ Log To Console \n File Exist: ${out}
+