Jump to content

[SOLVED] Theory question writting over a directory


koolaid

Recommended Posts

I am building an mp3 player CMS. I have everything working, but to make my cms more functional i would like to have all the data write to a temporary folder. Then before going live to the public the user can view what the finished page will look like. When the user hits save the temporary folder will write over the currently live folder. Is this possible? Could anyone point me in the direction of a good tutorial for this. Or does anyone have a snippet i can modify?

 

Thanks freaks

Link to comment
Share on other sites

Sorry i didn't mean to bump this thread i just forgot to add, That i have all the files writing to the temp folder already. I just need to know how to write over an existing directory if this is possible.

Link to comment
Share on other sites

Awesome i wasn't sure the best practice there. I didn't even think of deleting the live directory first. I will give that a shot. Just wondering, but would there be issues trying to write over a directory by naming a folder the same name as an existing folder? (just curious)

Link to comment
Share on other sites

Awesome i wasn't sure the best practice there. I didn't even think of deleting the live directory first. I will give that a shot. Just wondering, but would there be issues trying to write over a directory by naming a folder the same name as an existing folder? (just curious)

 

I'm not sure. You could also just copy the contents of the temp directory to the existing directory.

 

But, both of those methods have a flaw. If you have any file in the existing directory that does not exist in the temp directory, then copying or overwriting will not remove those unneeded files.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.