November 21, 2017, 03:56:18 PM

Author Topic: [bmx] Install Cache Root by Luke111 [ 1+ years ago ]  (Read 184 times)

Offline BlitzBot

  • Newbie
  • *
  • Posts: 0
[bmx] Install Cache Root by Luke111 [ 1+ years ago ]
« on: June 29, 2017, 12:28:43 AM »
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
  1. 'Install Cache Root
  2. 'Luke Bullard
  3. 'For luhttpd's PHP extension
  4. 'Just change the cache root extension.
  5. 'If you don't know what this is for, look in the networking section's Multithreaded PHP Server
  6. 'Cache Root Location:
  7. Global cacheroot$ = "D:cacheroot"
  8. Const numofdirs:Long = 800000
  9. Print "Creating " + String.FromLong(numofdirs) + " Directories"
  10. If Input("Continue? (Y/N) - ") = "Y" Then
  11. If FileType(cacheroot$) = 0 Then
  12.         CreateDir(cacheroot$)
  13.         Print cacheroot$
  14. Else
  15.         RuntimeError "Error: Could not make the Cache Root Base Directory; it already exists!"
  16. EndIf
  17. For x:Long = 0 To numofdirs Step 1
  18.         CreateDir(cacheroot$ + "" + String.FromLong(x))
  19.         CreateFile(cacheroot$ + "" + String.FromLong(x) + "atch.bat")
  20.         Print cacheroot$ + "" + String.FromLong(x)
  21. Next
  22. Print "Done"
  23. Delay 10000
  24. Else
  25. Print "Done"
  26. Delay 10000
  27. EndIf


Comments : none...