INNER CODE UNIT · Python

pathwalk

Haeri/PhotonBox · scripts/code_checker.py:19

def pathwalk(src, filter, function):
	for item in os.listdir(src):
		if os.path.isdir(src + item):
			#print("DIR: " + src + item + "/")
			pathwalk(src + item + "/", filter, function)
		elif item.lower().endswith(filter):
			#print("FILE: " + src + item)
			function(src + item)


# ----------- GENERAL INFO -----------------
def indexHeader(item):
	global header_loc
	all_header.append(item)
	header_loc += sum(1 for i in open(item, 'rb'))

def indexCpp(item):
	global cpp_loc

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…