![]() |
deletefolder(path)
deletes a custom folder (not like the levels folder) on the file browser so long as the contents are empty.
i need this for my login system, for the time being im going to have to make a way to reuse folders but this stinks because i have to add another client->server->client sequence to check if the character folder exists or is empty. anyways, thanks :) |
Wouldn't this be in future improvements as it does not exist yet?
But: Deleting custom folders should be in the rc :-(. And: You are making a folder for every character? But it should be added :-D |
Yes you can delete custom folders in RC but thats not dynamic and thats what the system needs to work as.
Yes, everything gets its own folder, items.. characters. accounts.. clans, etc |
Warcaptain: That would end out to be a lot of folders, if you think about it.
|
Yes, thousands probably thousands more if there is no deletefolder() function.
|
Just wondering, but wouldn't thousands of folders use up file size even if they are empty?
It's really going to be crazy if you ever accessed the folder that had all that, you should do it more like GK, and use one text file for all their items etc... |
Folders take virtually no space, our system has a text for each type of attribute to the player. ie: flags,items,location, etc
Once deletefolder() works it will be highly effecient. |
So each player has one folder, and inside you have Account_Flags.txt | Account_items.txt | Account_Locations.txt | Account_Weapons.txt?
|
Eh, something along those lines but not quite. :)
|
So what do you have a folder for Items then a billion text files for each item?
|
Each item has a text file and then the players character has a file with an array of all their items (the indexes) in it.
|
I think you are crazy heh.
Why would each item need a folder? Each item is probally like 300 bytes. |
Eh.. each item doesnt have a folder.. And what would you know anyways?
|
* I ment Text File.
And I don't understand why this is all needed, I think its crazy ;o. |
It works well, its not very demanding at all. :)
|
I'm assuming he's making a mudlib-type thing. Items have archetypes and are all separate text files. His folder structure is probably something like:
Archetypes/Items/<itemtype>/*.arc Mudaccounts/<accountname>/Flags.txt Mudaccounts/<accountname>/Items.txt Mudaccounts/<accountname>/whateverelse.txt |
Indeed, only its a bit more different because I am using a character based system.. players can have more than one character
|
Quote:
|
Pretty much. The system works pretty flawlessly and I am quite happy with its progress.
I do things so manadb/characters/charname/* and manadb/accounts/accname/* that way i dont have to keep a file with a list of all the characters to check if an character with the name alreay exists... also it (since no deletefolder exists) allows me to reuse character folders :) That way if player with acc1 makes a char named Bob and then deletes it.. if player acc2 makes a char named bob, it will reuse the folder. (saving space) |
| All times are GMT +2. The time now is 01:19 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.