Lines Matching full:path

22 def is_empty_and_create(path, action):  argument
23 abspath = os.path.abspath(path)
24 if not os.path.exists(abspath):
26 elif not os.path.isdir(abspath):
27 print('Your target path is not a directory. Please remove the', os.path.abspath(abspath),
28 'or use different target path.')
30 elif len(os.listdir(path)) > 0:
32 'you must empty the directory or choose a different path.')
37 …copy_tree(os.path.join(os.environ['IDF_PATH'], 'examples', 'get-started', 'sample_project'), targe…
38 main_folder = os.path.join(target_path, 'main')
39 os.rename(os.path.join(main_folder, 'main.c'), os.path.join(main_folder, '.'.join((name, 'c'))))
40 replace_in_file(os.path.join(main_folder, 'CMakeLists.txt'), 'main', name)
41 replace_in_file(os.path.join(target_path, 'CMakeLists.txt'), 'main', name)
42 os.remove(os.path.join(target_path, 'README.md'))
46 os.remove(os.path.join(target_path, 'Makefile'))
47 os.remove(os.path.join(target_path, 'main', 'component.mk'))
51 …copy_tree(os.path.join(os.environ['IDF_PATH'], 'tools', 'templates', 'sample_component'), target_p…
52 os.rename(os.path.join(target_path, 'main.c'), os.path.join(target_path, '.'.join((name, 'c'))))
53 os.rename(os.path.join(target_path, 'include', 'main.h'),
54 os.path.join(target_path, 'include', '.'.join((name, 'h'))))
56 replace_in_file(os.path.join(target_path, '.'.join((name, 'c'))), 'main', name)
57 replace_in_file(os.path.join(target_path, 'CMakeLists.txt'), 'main', name)
62 target_path = action_args.get('path') or os.path.join(project_path, action_args['name'])
69 print('The', get_type(action), 'was created in', os.path.abspath(target_path))
84 … "For specifying the new project's path, use either the option --path for specifying the "
87 … 'If the target path does not exist it will be created. If the target folder is not empty '
89 … 'If the target path is not a folder, the script will fail with return code 4. '
95 'names': ['-p', '--path'],
96 'help': ('Set the path for the new project. The project '
110 "For specifying the new component's path use the option -C. "
111 'If the target path does not exist then it will be created. '
114 … 'If the target path is not a folder, the script will fail with return code 4. '