Code archives/Miscellaneous/Install Cache Root

This code has been declared by its author to be Public Domain code.

Download source code

Install Cache Root by Luke1112011
Here you go! From my other project, Multithreaded PHP Server, based on BlitzServe2.
'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) + "\batch.bat")
	Print cacheroot$ + "\" + String.FromLong(x)
Next
Print "Done"
Delay 10000
Else
Print "Done"
Delay 10000
EndIf

Comments

None.

Code Archives Forum