How to obtain a list of directories within a directory, like list.files(), but instead “list.dirs()”

Update: A list.dirs function was added to the base package in revision 54353, which was included in the R-2.13.0 release in April, 2011. list.dirs(path = “.”, full.names = TRUE, recursive = TRUE) So my function below was only useful for a few months. 🙂 I couldn’t find a base R function to do this, but … Read more

Gitignore won’t ignore .vs folder for Visual Studio 2015 RC on Windows7/8

Follow the steps below, the issue will be solved. Step 1: Add following content to the file .gitignore. ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. # User-specific files *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ … Read more

How to delete empty folders using windows command prompt?

You can use the ROBOCOPY command. It is very simple and can also be used to delete empty folders inside large hierarchy. ROBOCOPY folder1 folder1 /S /MOVE Here both source and destination are folder1, as you only need to delete empty folders, instead of moving other(required) files to different folder. /S option is to skip … Read more

deleting folder from java [duplicate]

If you use Apache Commons IO it’s a one-liner: FileUtils.deleteDirectory(dir); See FileUtils.deleteDirectory() Guava used to support similar functionality: Files.deleteRecursively(dir); This has been removed from Guava several releases ago. While the above version is very simple, it is also pretty dangerous, as it makes a lot of assumptions without telling you. So while it may be … Read more

How can I use PHP to check if a directory is empty?

It seems that you need scandir instead of glob, as glob can’t see unix hidden files. <?php $pid = basename($_GET[“prodref”]); //let’s sanitize it a bit $dir = “/assets/$pid/v”; if (is_dir_empty($dir)) { echo “the folder is empty”; }else{ echo “the folder is NOT empty”; } function is_dir_empty($dir) { if (!is_readable($dir)) return null; return (count(scandir($dir)) == 2); … Read more

Directory Chooser in HTML page

Try this, I think it will work for you: <input type=”file” webkitdirectory directory multiple/> You can find the demo of this at https://plus.google.com/+AddyOsmani/posts/Dk5UhZ6zfF3 , and if you need further information you can find it here.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)