WordPress Move – Weekly Update 6

This week, I worked on writing tools for archiving files using PclZip. So far it consists of 6 functions:

  • createArchive( $directory ) : Creates an archive of the given directory.
  • createArchiveAdvanced( $array ) : Creates an archive of the given files.
  • extractArchive( $filename, $destination ) : Extracts the given archive to the given destination.
  • calculateTotalUsage( $directory ) : Calculates the total disk space the given directory uses.
  • listAllFiles( $directory ) : Creates a list of all the files under the given directory.
  • divideIntoChunks( $directory, $chunk_size ) : Creates lists of files (a 2 dimensional array) by dividing files inside a directory into chunks.
I think functions are pretty clear and they do not need any further explanation but of course, I would love to answer your questions, if you have any.

This task is almost complete but I need to make sure I did not forget anything before closing the ticket related to the task. I will commit the file to the repo and close the ticket tomorrow.

Next week, I will be working on writing tools for uploading files to the new server.

See you next week!