I am fairly new to python and working on a little project for personal use.
I need to create a dummy placeholder file in all empty directories
I did almost everything except the command to create the file, because I do not know how.
my code:
import os, glob
dirs = []
paths = ["system", "vendor"]
for path in paths:
dirs.append(glob.glob(path + '/**/', recursive=True))
for dir in dirs:
for dir1 in dir:
if len(os.listdir(dir1)) == 0:
// how would i create a placeholder file
else: continue
Thank you