Passed
Branch DICOMAnonimization (c59297)
by Yang
02:05
created

file_operation.make_flat_folder_structure()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
import time
2
import os
3
import logging
4
import sys
5
6
def recursive_list_files(root_dicom_path):
7
    """
8
    load all the files, validate and then pass to decompress or anonimize.
9
    :param path:
10
    :return:
11
    """
12
    global file_list
13
    file_list = []
14
15
    for root, directories, filenames in os.walk(root_dicom_path):
16
        #for directory in directories:
17
            #file_list.append(os.path.join(root, directory))
18
        for filename in filenames:
19
            file_list.append(os.path.join(root,filename))
20
    return file_list
21
22
def get_file_name(path):
23
    file_name = os.path.basename(path)
24
    return file_name
25
26
def make_flat_folder_structure():
27
    return
28
29
def zip_with_name(path, name):
30
    return