Welcome To Snipplr


Everyone's Recent Snippets Tagged directory



1 2180 posted 16 years ago by ginoplusio
0 1891 posted 16 years ago by Zwendel
1 2074 posted 16 years ago by blackf0rk
0 2246 posted 16 years ago by blackf0rk
Calculate dir size recursive, follow the link above because the version above is better.
0 1943 posted 16 years ago by ginoplusio
0 1349 posted 16 years ago by bigredjoe
0 1630 posted 16 years ago by garretjames
Sometime it is convenient to get recursive directory listing as array of items directory => (file array) Such as: Array ( [./a2temple] => Array ( [0] => example13.zip )...
2 1818 posted 17 years ago by artoodetoo
0 1887 posted 17 years ago by paulgrenwood
This assumes the modules names are CamelCase and not UPPERCASE.
0 2671 posted 17 years ago by blasterpal
0 1924 posted 17 years ago by wearetherock
0 1805 posted 17 years ago by dsntos
When using `ln` to create a link in a different directory, the semantics of creating hard and symbolic links differ. That is because a hard link contains a direct reference to its target's data, while a symbolic link is just a string containing a (p...
1 2297 posted 17 years ago by deepsoul
By requinix
0 1618 posted 17 years ago by smoover
3 2230 posted 17 years ago by fackz
Flash has a weird cache mechanism, this makes sure that the browser isn't caching any data.
0 3243 posted 17 years ago by iloveitaly
This snippet will create an array of all images in a directory and sub-directories and display them randomly.
4 5583 posted 17 years ago by superuntitled
Like python's os.listdir
1 2331 posted 17 years ago by iloveitaly
change user's home directory
0 1652 posted 17 years ago by stiobhart
2 1689 posted 17 years ago by dennyhalim
This function simply takes a Windows UTC timestamp and converts it to Unix epoch. This was useful when I was pulling LDAP information from Active Directory and the timestamps were ridiculous. Windows builds timestamps by counting seconds since Janua...
0 2206 posted 17 years ago by cllorca
1 1920 posted 17 years ago by dsntos
I always forget this.
0 1888 posted 17 years ago by tclancy
Here’s a snippet that can help you to remove a non-empty directory from the server. It’s a recursive function that deletes the directory with its files, folders and sub-folders.
2 2193 posted 17 years ago by fackz
This is a function that selects files from a directory and orders them by the last time they were changed, in ascending or descending order. The snippet also calculates how much time passed since the file’s content was changed.
2 3095 posted 17 years ago by fackz
Helpfull function to remove recursively specific folders.
3 2114 posted 17 years ago by eden159
3 2503 posted 17 years ago by fruehjahr
0 1703 posted 17 years ago by archlight