Calculate Directory Snippets


This is a PHP Class that calculates the size, number of files & folders of a specific directory.

When developing applications that need to operate on files and directories it is a common task to, for example, get the list of all sub-directories for a given directory.

This function will not recurs subdirectories - it will only return a list of sub folder on the "first" level.

19 October, 2013   

Mysql code shows how to calculate last 7 days

MySQL code example to calculate age from Date Of Birth

How to select directory using JFileChooser

Normally index.html or index.php is the default page a server serves up when visiting a directory without specifying a file name. You can change this with .htaccess:

05 November, 2012   

PL/SQL example shown below how to use BFILENAME

03 August, 2013   

Example shows bash code to change CWD to file's directory

11 August, 2013   

Returns the given directory with a trailing backslash. If the directory already ends in backslash it is returned unchanged.

17 October, 2011   

Copying Folders With All Contents Including Other Folders. VB.net 2010 does not have a built in code to copy full folders with their contents but only files(one by one)!!! But you can do it by this code

03 August, 2013   

ColdFusion code for upload files to directory

18 September, 2013   

PHP example for listing directory contents

26 April, 2015   

Recursively determines the size of a directory

Java code example to list the Files or Subdirectories in a Directory

Java code for listing files or sub-directories in a directory

How to calculate distance between Mouse and Element

Scripts used to calculate Daylight Saving Time (DST) for the US and EU. Valid for years 1900 to 2099. [DST wasn't adopted until the 1950s-1960s for US and 1990s for the EU] By: brad degrandis

PHP code to calculate the difference between two dates

23 August, 2014   

Correctly calculate the date of Easter Sunday.