subdirectory

Is there any method to know whether a directory contain a sub directory?

I am woking in c++. Is there any method to know whether a directory contain a sub directory? CFileFind seems have to search through total files. It is time consuming if the only subdirectory is at the end of the list and the there are lots of files. for example: directory A contains 99995 files and one subdirectory at the end of FindNe...

Python: import a file from a subdirectory

Hi, I have a file called tester.py, located on /project. /project has a subdirectory called lib, with has a file called BoxTime.py: /project/tester.py /project/lib/BoxTime.py I want to import BoxTime from tester. I have tried this: import lib.BoxTime Which resulted: Traceback (most recent call last): File "./tester.py", line 3...

PHP - FTP subdirectory recursively?

The code below works insomuch that I can successfully download the directory recursively. But, I want to download the directories within this directory. So, when it connects it's in . Within the . directory is a subdirectory "In". I want to recursively retrieve the contents within the In directory. The directory names themselves wil...

SVN: Is it possible to get the list of revision numbers for given path?

I am making a PHP tool that connects to a repository, downloads the list of commits and stores them locally. However, due to the possibility that certain repositories are HUGE and grabbing their log results in long waiting time and possible time-outs/errors, I would like to download each commit message using async requests. So, I have a...

Python directory searching and organizing by dict.

Hey all, this is my first time recently trying to get into the file and os part of Python. I am trying to search a directory then find all sub directories. If the directory has no folders, add all the files to a list. And organize them all by dict. So for instance a tree could look like this Starting Path Dir 1 Subdir 1 Subdir 2 Sub...

make wildcard subdirectory targets

I have a "lib" directory in my applications main directory, which contains an arbitrary number of subdirectories, each having its own Makefile. I would like to have a single Makefile in the main directory, that calls each subdirectory's Makefile. I know this is possible if I manually list the subdirs, but I would like to have it done au...

ASP.NET MVC - Running in a Subdirectory

I am attempting to deploy an ASP.NET MVC application in a subdirectory of an existing application and I am running into some routing issues. I have set up the folder structure such that all of the binaries and config files for the MVC app are correctly located in the root directory, while the rest of the content is in the subdirectory. A...

Ruby on Rails -Problem using subdirectories

Hi, I have tried to set up a separate section of my app using a subdirectory called controlpanel to manage various parts of the site. I've set up the namespace in my routes.rb map.namespace :controlpanel do |submap| submap.resources :pages # other controllers end And placed the controller and views into the relevant subdirect...

SVN move single directory into other repository (with history)

Related question: Moving repository trunk to another’s branch (with history) I know that one can dump a complete SVN repository with history and load it into a user-defined (sub)directory of the target repository using: // in source repo > svnadmin dump . > mydumpfilename // in destination repo (backslashes because I'm using Windows...

Git Merge subdirectory to branch to root directory of master

I have a branch that has the content of the master branch as a subdirectory. Now I made some changes to this subdirectory. Ideally I want to be able to merge these changes back into the master branch. Branch layout: index.html subdirectory > a.txt > b.txt Master layout a.txt b.txt How would I go about doing this? Is it even a ...

Recursive subdirectory SQL problem

This is a mental excercise that has been bothering me for a while. What strategy would you use to solve this sort of problem? Let's consider the following simple database structure. We have directories, obviously a tree of them. Also we have content items, which always reside in some directories. create table directory ( directoryId ...

Makefile Build Directory and dependencies list

Hello, In a makefile, I build all my .o files in a build directory: program: class1.o class2.o class3.o g++ $(BUILDDIR)class1.o $(BUILDDIR)class2.o $(BUILDDIR)class3.o -o $@ It would be cool to generate $(BUILDDIR)class1.o $(BUILDDIR)class2.o $(BUILDDIR)class3.o from the dependencies list... I know that $^ would give me the list...

How do I rewrite a URL based on a dynamic first directory name?

My goal is to redirect: http://users.domain.com/<username>/other/path/info to http://users.domain.com/other/path/info The key here is that that the "username" in the source URL could of course be anything. Here is a more concrete example of what I want to do (and why): Suppose I have username of "bill". I want Bill to be ab...

PHP Get all subdirectories of a given directory

How can I Get all subdirectories of a given directory (without files and "." or "..") and then use each directory in a function? Thanks. ...

How can I use htaccess to protect a subdirectory of codeigniter installation?

I have codeigniter installed at the root directory, and would like to have a subdirectory called "test" password protected using htaccess. I keep getting a "404 page not found" no matter what I try. The directory structure is: /public_html /css /images /system (codeigniter directory) /test .htaccess .htacce...

Flex Import Class from a Module within a sub directory

I put some modules in a module folder. How do I import classes with the import statement when I'm in a sub folder? This won't work, not like classes which are in packages. modules/SomeModule.mxml <?xml version="1.0"?> <mx:Module> <mx:Script> <![CDATA[ import Fruit.Apple; ]]> </mx:Script> </mx:Module> D...

Count files in directories AND subdirectories? iPhone

I am trying to count entire files in a directory, including subdirectories. This is what I have to count files in the first folder: -(NSString *)numberOfPhotos { NSString *MyPath = @"/rootdirectory/"; NSArray *directoryContent = [[NSFileManager defaultManager] directoryContentsAtPath:MyPath]; return [NSString stringWithFo...

How to Set up Virtual Static Subdomain

Given current rewrite rules at http://www.example.com/: Options +FollowSymlinks +Includes RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} !^www\.example\.com [NC] RewriteCond %{HTTP_HOST} !^$ RewriteRule ^/?(.*) http://www.example.com/$1 [L,R,NE] # Remove all "index.html"s. RewriteCo...

Subdirectory on a different host

I've got a site www.example.com on one server. I'd like to create www.example.com/blog on another server/host. A) Can I do this? B) How can I do this? I've read a bit on using Apache's mod_proxy, proxypass, and ProxyPassReverse, but I'm not gifted enough with Apache or server mgt to know if I'm on the right track or not. Or, if there...

creating an admin subdirectory

I am trying to create a separate subdomain for an administrator to edit their webpage, like admin.example.com in cPanel, I created a subdirectory called admin and it automatically created a root directory under /public_html/admin. I password protected the directory and it works great. It also brings up the password prompt when I go to...