directory

What is the best approach for copying a file from your project folder to the documents folder on your iPhone?

I have 2 different projects that have the same exact code, I am using NSSearchPathForDirectoriesInDomains to get the document directory and NSFileManager to check if fileExistsAtPath. In the one project everything works great, in the other, the file is not found. I set breakpoints for both and NSLogged out everything and apparently ther...

How do I get the path to your the iPhone resources folder?

I am currently using [[NSBundle mainBundle] resourcePath]. Is there a different way to do this? ...

How can I recursively read out directories in Perl?

Hi, I want to read out a directory recursively to print the data-structure in an HTML-Page with Template::Toolkit. But I'm hanging in how to save the Paths and Files in a form that can be read our easy. My idea started like this sub list_dirs{ my ($rootPath) = @_; my (@paths); $rootPath .= '/' if($rootPath !~ /\/$/); ...

File System Types in .Net

I don't get the abstractions and the terminology :-( For example, DirectoryInfo.FullName is defined as the full path of the directory or file, but it's a string! So is DirectoryInfo.Name, FileInfo.FullName, Path.GetDirectoyName and so on. This means that in .Net there is no "depth" (or "meat" - my English isn't so good) for the file s...

Creating directory?

When I create a directory using sytem user (vin.txt is my file) create directory emp_dir1 AS "'C:\Documents and Settings\Administrator\Desktop\vin.txt'"; it creates it. When I do the same using user Scott it gives an error for path of file that "Identifier is too long" but when I put this file path in single quotes instead ...

PHP: How do I loop through every XML file in a directory?

Hi! I'm building a simple application. It's a user interface to an online order system. Basically, the system is going to work like this: Other companies upload their purchase orders to our FTP server. These orders are simple XML files (containing things like customer data, address information, ordered products and the quantities…) I...

Get contents of local folder in javascript (or ASP.NET VB)

Is it possible for a webpage to popup a open folder dialog, ask the user to select a folder, then show the contents of that folder in a list(or something) in the webpage. It won't write to the files, only read them. The webpage is hosted remotely. Jonathan ...

Robust Directory Manager in PHP

This is a general question. What are some techniques you employ to prevent the links in your PHP code from breaking every time you move a file or move a file into a different directory? ...

Display `pretty output` of directory content from array

Hi, I'm using the following code to get an array of directories and their sub-directories where each contain file type extension: png. It works great but I need to be able to output the results of the array in a list style format e.g. * Test -> test2.png -> test1.png * subfolder -> test3.png * sub sub folder -> test...

What's the best way to tell if a file exists in a directory?

I'm trying to move a file but I want to ensure that it exists before I do so. What's the simplest way to do this in Perl? My code is like this. I looked up the open command, but I am not sure it is the simplest way or not. if #Parser.exe exist in directory of Debug { move ("bin/Debug/Parser.exe","Parser.exe"); } elsif #Parser.e...

Iterate through every file in one directory

How do i write a loop in ruby so that I can execute a block of code on each file? I'm new to ruby, and I've concluded that the way to do this is a do each loop. The ruby file will be executed from a different directory than the directory I want to loop through. I've tried the Dir.foreach and I couldn't get it to work. ...

how to add folder to a listbox in .net?

i have a list box and i want to add a folder/directory to that which is at the specified location i have used the code string path = "E:\\shruti\\MyDir"; DirectoryItem folder = new DirectoryItem(path); lstBurnItems.Items.Add(folder); //add folder to listbox but its not working fine... what should i do to get success?? ...

iPhone dev: load a file from resource folder

I'm writing an iPhone app with a UIWebView which should display various html files I have in the app resource folder. In xcode my project overview, these html files are displayed like this: dirA |---> index.html |---> a1.html |---> a2.html |---> my.css |---> dirB |---> b1.html |---> b2.html |---> dirC |---> c1.html ...

Create Active Directory schema into OpenLDAP

Hi Friends, I need to store Active Directory Data into OpenLDAP and for that I want to create the Active Directory schema into OpenLDAP. How to do it? ...

PHP - Read number of dirs and then require for each a specified file name

Hello, I want to make a little script but I'm rather n00b in php so please help me if you can :) What I want the script to do is: I have "index.php". I want "index.php" to read the sub-directories from a known folder, let's say "templates/" Each sub-directory will contain a file called "content.html". The index will then load the "co...

How do I sort a directory by time, and display the last four image files matching a pattern with php?

I have a directory that will be getting updated frequently, I want to display the last four images files uploaded, which match a certain pattern, on my php page. Is this possible without having to perform a sort on every single image within the directory? Many thanks! ...

directory path question

What is the difference between: include("./somepath/class.php"); and include("somepath/class.php"); ...

list images from directory by function

i'm using this function: function getmyimages($qid){ $imgdir = 'modules/Projects/uploaded_project_images/'. $qid .''; // the directory, where your images are stored $allowed_types = array('png','jpg','jpeg','gif'); // list of filetypes you want to show $dimg = opendir($imgdir); while($imgfile = readdir($dimg)) { if(in_array(strtolower...

I could really use a php based directory printer that lists all of the folders found in a windows directory.

Is this possible without uploading any of the clients files to my server? ...

Directory.Move doesn't work (file already exist)

I've got main folder: c:\test And there I have 2 folders: Movies and Photos. Photos has three folders with files with the same structure: People, Animals and Buildings. I'm trying this code: Directory.Move(@"c:\test\Movies", @"c:\test\Test"); I get exception: File already exists ...