Lines Matching refs:path
37 @param template_file_path: Obtains the absolute path of the template screen cap path.
42 if os.path.isabs(template_file_path) \
43 and (not isdir and os.path.isfile(template_file_path)):
44 return os.path.abspath(template_file_path)
47 if not os.path.isfile(template_file_path) and template_file_path.startswith("/"):
52 path = template_file_path[9:]
55 folder = os.path.abspath(EnvPool.resource_path)
56 _fol = travesal_folder(folder, path, isdir)
58 log.debug("Not found [%s] in env pool path %s, "
59 "continue to find template in resource path." % (
60 path, folder))
64 folder = os.path.abspath(ecotest_resource_path)
65 _fol = travesal_folder(folder, path, isdir)
67 log.debug("Not found [%s] in resource path %s, "
68 "continue to find template in other path." % (
69 path, folder))
72 log.debug("get template path:{}".format(_fol))
78 @param resource_file_path: Obtains the absolute path of the resource file.
83 if os.path.isabs(resource_file_path) \
84 and ((isdir is None and os.path.exists(resource_file_path))
85 or (not isdir and os.path.isfile(resource_file_path))
86 or (isdir and os.path.isdir(resource_file_path))):
87 return os.path.abspath(resource_file_path)
92 folder = os.path.abspath(EnvPool.resource_path)
95 log.debug("Not found [%s] in env pool path %s, "
96 "continue to find in project resource path." % (
102 folder = os.path.abspath(ecotest_resource_path)
105 log.debug("Not found [%s] in ecotest path %s, "
106 "continue to find in suit path." % (
111 folder = os.path.abspath(DeccVariable.project.resource_path)
114 log.debug("Not found [%s] in product path %s, "
115 "continue to find in project resource path." % (
119 folder = os.path.abspath(DeccVariable.project.test_suite_path)
122 log.debug("Not found [%s] in product path %s, "
123 "continue to find in suit resource path." % (
127 folder = os.path.abspath(get_project_path())
130 log.debug("Not found [%s] in product path %s, "
131 "continue to find in project path." % (
138 log.debug("get resource path:{}".format(_fol))
143 folder_file = os.path.join(folder, folder_file_path)
144 if (isdir is None and os.path.exists(folder_file)) \
145 or (not isdir and os.path.isfile(folder_file)) \
146 or (isdir and os.path.isdir(folder_file)):
147 return os.path.abspath(folder_file)
149 if not os.path.exists(folder):
156 folder_file = os.path.join(folder, child)
157 if os.path.isdir(folder_file):
166 elif os.path.isfile(folder_file) \
178 dir_path = os.path.dirname(file_path)
179 if not os.path.isdir(dir_path):
213 create_path: The path of the directory to create.
215 full_path = os.path.abspath(os.path.expanduser(create_path))
216 if not os.path.exists(full_path):
224 dirname = os.path.dirname(filename)
225 if not os.path.isdir(dirname):
235 if os.path.isfile(filename):
242 if os.path.isfile(filename):
248 if os.path.isfile(filename):
256 if os.path.isdir(dirname):
260 if os.path.isdir(dirname):
266 if os.path.isdir(dirname):
273 src = os.path.normpath(src)
274 des = os.path.normpath(des)
275 if not os.path.exists(src):
278 if not os.path.exists(des):
280 if not os.path.isdir(des):
284 if not os.path.isdir(src):
288 src_file_list = [os.path.join(src, src_file)
291 if os.path.isfile(source):
293 if os.path.isdir(source):
294 _, src_name = os.path.split(source)
295 shutil.copytree(source, os.path.join(des, src_name))
303 if os.path.isfile(src):
305 elif os.path.isdir(src):
354 if not os.path.exists(extract_to):