Tabulating File Information

I have been a bit lazy with regard to deploying this blog and am not sure of the best way of dealing with it

As you may know, the package I use, blogdown, you create all the files within a public directory which you can then deploy the files to your server of choice. I have my own site and upload all the files to replace the existing ones

The problem I have is that some of the files on the site are very large and so the process can take a long time.

The alternatives that spring to mind (though there may be others is)

  • copy the existing public folder to say, publicOld, rebuild the site and compare public/publicOld somehow to upload only changed files. Or just try and remember what will change

  • remove large data files from the site and make them accessible remotely for anybody running the code

  • rewrite pages with files reduced in size but still sufficient the relevant (maybe adjusted) code

In general, it would be nice to have information easily available for file sizes in the blogdown project(s). I’m guessing that there is already something out there but it wasn’t that tough to come up with some code

If you run this in RStudio, the path will be shown in the console and the resultant data.frame will be on view and available for sorting

By default, all files in the working directory and sub-directories are shown but any path can be entered into the file_info() call

Here is an example of the output

This has probably already been done but, if not, should be fairly easy to turn into a snippet or Addin

Share Comments
comments powered by Disqus