MCPcopy Create free account
hub / github.com/bobolike123/NetworkTrafficAnalysis / createBlankFile

Class createBlankFile

tools/pickSmallDataset.py:36–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 for i in file_to_del:
35 os.remove(os.path.join(file_path,i))
36class createBlankFile:
37 def __init__(self, originPath, goalPath):
38 self.origin_path = originPath
39 self.goal_path = goalPath
40
41 def createNewFiles(self):
42 filenameList = ['train\\Normal', 'train\\Infilt', 'train\\HttpDoS', 'train\\DDoS', 'train\\BFSSH',
43 'validation\\Normal', 'validation\\Infilt', 'validation\\HttpDoS', 'validation\\DDoS',
44 'validation\\BFSSH']
45 for fn in filenameList:
46 newPath = self.goal_path + '\\{}'.format(fn)
47 if not os.path.exists(newPath):
48 os.makedirs(newPath)
49 print(newPath + " created")
50 print('Files have been created')
51
52
53class createDataSet:

Callers 1

checkFileisExistMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected