files

Can you append a NSMutableArray to a file?

Hi. I am trying to write some data from an NSMutableArray to a plist, while keep the old plists content. The function writeToFile:atomically: overwrites the old contents with the new, I want to append the objects in the new array to the plist. How can this be done? Thank you. How can you check for duplicates while doing this? ...

Copy files in folder up one directory in python

I have a folder with a few files that I would like to copy one directory up (this folder also has some files that I don't want to copy). I know there is the os.chdir("..") command to move me to the directory. However, I'm not sure how to copy those files I need into this directory. Any help would be greatly appreciated. UPDATE: This ...

(win32) What to do when a file remains left open when a remote application crashes or forgets to close the file

Hi I have not worked so much with files: I am wondering about possible issues with accessing remote files on another computer. What if the distant application crashes and doesn't close the file ? My aim is to use this win32 function: HFILE WINAPI OpenFile(LPCSTR lpFileName, LPOFSTRUCT lpReOpenBuff, UINT uStyle); Using the flag OF_SHA...

Python - a clean approach to this problem?

Hi, I am having trouble picking the best data structure for solving a problem. The problem is as below: I have a nested list of identity codes where the sublists are of varying length. li = [['abc', 'ghi', 'lmn'], ['kop'], ['hgi', 'ghy']] I have a file with two entries on each line; an identity code and a number. abc 2.93 g...

How to make a file invisible in Finder using objective-c

I need to hide the file in finder as well as in spotlight if possible using objective-c or using C calls. Thanks ...

Analyze VS2010 C# projects and report files on disk not part of the projects?

I discovered earlier tonight that files and folders I have removed from my C# projects are apparently still on disk, even though my Visual Studio Mercurial plugin seems to do a good job of deleting them when I delete them in Visual Studio. It must have hickuped when it came to these files. So I wondered... Does anyone have a script or s...

A PHP CMS to manage Files and privileges between users

I'm looking for a PHP CMS which can let me to: 1-Uploade and manage files ( pdf, words..) between users by allowing to view, to print or to download. 2-Know who accessed what and when, who download what and when... who do what and when. ...

What is the easiest way to let user to update the web page contents based on a file on his computer ?

I'm writing an application that runs on Firefox 3.6.3 for internal use only. I would like to be able to update the contents on the page based on a file on my computer. What is the easiest way to achieve this ? I understood from other posts here that I must upload the file to the web server and then return the contents back to the brow...

What are the pro and cons of having localization files vs hard coded variables in source code?

Definitions: Files: Having the localization phrases stored in a physical file that gets read at application start-up and the phrases are stored in the memory to be accessed via util-methods. The phrases are stored in key-value format. One file per language. Variables: The localization texts are stored as hard code variables in the ap...

Create Hidden Windows file/folder from Linux

Is it possible to create a file on a mounted SMB share that is hidden from Windows? The .(dot) prefix doesn't work in this case because that only works on Linux. Basically I'm looking for the same affect as using attrib +h on Windows, but under Linux. ...

Unexpected Blank lines in python output

I have a bit of code that runs through a dictionary and outputs the values from it in a CSV format. Strangely I'm getting a couple of blank lines where all the output of all of the dictionary entries is blank. I've read the code and can't understand has anything except lines with commas can be output. The blank line should have values...

Dumping to Console works like a charm, but not to a file, C#

Consider this piece of code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; namespace DataExtractor { class Program { static void Main(string[] args) { string destpath = Directory.GetCurrentDirectory(); destpath = Path.Combine(de...

How to automatically resolve source links in Visual Studio

I'm working on the project that uses another project source (not as referenced assembly). When my colleagues are changing with big problem that I need to synchronize file structure changes in 5 projects. Please, advise me how can I synchronize this source links automatically or semi-automatically, but not making "Create directory", "Ad...

ASP upload HTTP error

Hello, I have the following code in uploadLogo.asp: <% Set Upload = Server.CreateObject("Persits.Upload") ' we use memory uploads, so we must limit file size Upload.SetMaxSize 100048576 ' Limit files to 100MB ' Save to memory. Path parameter is omitted Upload.Save ' Check whether a file was selected Set File = Upload.Files("Filedata")...

How many files in a directory is too many (on Windows and Linux) ?

Possible Duplicate: How many files in a directory is too many? I was told that putting too many files in a directory can cause performance problems in Linux, and Windows. Is this true? And if so, what's the best way to avoid this? ...

Preserve name of file using cURL to transfer files

I'm transferring files from an existing http request using cURL like so... $postargs = array( 'nonfilefield' =>'nonfilevalue', 'fileentry' => '@'.$_FILES['thefile']['tmp_name'][0] ); $ch = curl_init('http://localhost/curl/rec.php'); curl_setopt($ch,CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Window...

Fastest file reading in C.

Right now I am using fread() to read a file, but in other language fread() is inefficient i'v been told. Is this the same in C? If so, how would faster file reading be done? ...

How to browse folders in java?

I tried to create a JFileChooser but I don't understand how to set it to show directories only. ...

iPhone / NSArray : How do I format a text file to be read in using arrayWithContentsOfFile

I have several large word lists and I had been loading them in place in the code as follows: NSArray *dict3 = [[NSArray alloc] initWithObjects:@"abled",@"about",@"above",@"absurd",@"absurdity", ... but now it is actually causing an exc_bad_access error weirdly, i know it seems implausible but for some reason IT IS causing it. (trust m...

MATLAB - read files from directory?

Hi, I wish to read files from a directory and iteratively perform an operation on each file. This operation does not require altering the file. I understand that I should use a for loop for this. Thus far I have tried: FILES = ls('path\to\folder'); for i = 1:size(FILES, 1); STRU = pdbread(FILES{i}); end The error returned here ...