[bmx] Install Cache Root by Luke111 [ 1+ years ago ]

Started by BlitzBot, June 29, 2017, 00:28:43

Previous topic - Next topic

BlitzBot

Title : Install Cache Root
Author : Luke111
Posted : 1+ years ago

Description : Here you go! From my other project, Multithreaded PHP Server, based on BlitzServe2.

Code :
Code (blitzmax) Select
'Install Cache Root
'Luke Bullard
'For luhttpd's PHP extension
'Just change the cache root extension.
'If you don't know what this is for, look in the networking section's Multithreaded PHP Server
'Cache Root Location:
Global cacheroot$ = "D:cacheroot"
Const numofdirs:Long = 800000
Print "Creating " + String.FromLong(numofdirs) + " Directories"
If Input("Continue? (Y/N) - ") = "Y" Then
If FileType(cacheroot$) = 0 Then
CreateDir(cacheroot$)
Print cacheroot$
Else
RuntimeError "Error: Could not make the Cache Root Base Directory; it already exists!"
EndIf
For x:Long = 0 To numofdirs Step 1
CreateDir(cacheroot$ + "" + String.FromLong(x))
CreateFile(cacheroot$ + "" + String.FromLong(x) + "atch.bat")
Print cacheroot$ + "" + String.FromLong(x)
Next
Print "Done"
Delay 10000
Else
Print "Done"
Delay 10000
EndIf


Comments : none...