January 2020
Intermediate to advanced
532 pages
13h 31m
English
To follow the subsequent code for this pattern, we can prepare some test data. Before you run the code here, make sure that you have enough disk space for the test data. You will need approximately 22 GB of free space.
Rather than putting 100,000 files in a single directory, we can split them into 100 sub-directories. So, let's just create the directories first. A simple function is created for that purpose:
function make_data_directories() for i in 0:99 mkdir("$i") endend
We can assume that every security is identified by a numerical index value between 1 and 100,000. Let's define a function that generates the path to find the file:
function locate_file(index) id = index - 1 dir = string(id % 100) joinpath(dir, ...
Read now
Unlock full access