So I started working on a dtdmp (data dump) program and I've tried for what seems to be 4 - 5 hours trying to figure it out and yes I did follow the rules of thumb: check the api list, look for similar and resolved issues on the forum, check if anyone has done such a thing!
why I need this is for a turtle to communicate with a computer via a disk drive to instantly give instructions to each other.
I've tried the fs api. the copy program, and I can't come up with a solution to blacklist things to copy to the drive.
With regards
- Qwerty -
0
6 replies to this topic
#1
Posted 18 July 2017 - 02:21 AM
#2
Posted 18 July 2017 - 03:36 AM
local blacklist = {["someFileName"] = true, ["someOtherFileName"] = true, ["yetAnotherFileName"] = true} if not blacklist[varWithNameOfFileYouWantToCopy] then -- copy file end
If you're still having trouble, elaborate on the part where you're getting stuck - what code have you tried, and how did the result differ from what you wanted?
#3
Posted 18 July 2017 - 05:30 AM
sorry if I haven't described my exquisite desires to copy every single item on the computer exept disk/ and rom/, in the mean time, thank you for your loyal devotion to this quite intriguing and amazing community!
with regards
- Qwerty -
with regards
- Qwerty -
#4
Posted 18 July 2017 - 05:39 AM
If you only want to blacklist files that "aren't on the computer's own drive", then you just need to check that fs.getDrive(path) == "hdd".
#5
Posted 18 July 2017 - 05:45 AM
but then how do I blacklist the rom folder? thanks tho for the drive check!
#6
Posted 18 July 2017 - 06:00 AM
"rom" is considered a drive of its own.
#7
Posted 18 July 2017 - 06:34 AM
well thank you kind sir!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users