Hello.
I would like to touch my files from C code to modify their access date. This does not seem to work:
struct stat fileSt;
lstat(path, &fileSt);
fileSt.st_mtime = time(NULL);
Thank you for help.
...
I've got a Mac server and I'm building PHP code to allow users to upload images, documents, and even video files. Researching this has definitely gotten me nervous, I want the uploaded content to be virus free.
Is building something myself going to be a huge challenge? Would you do it, or would you find some OS or OTS product? (And do ...
... How do you do it? My code/ directory at work is organized in folders and subfolders and subsubfolders, all of which (at least in theory) contain scripts or programs I want to run on a regular basis.
Its turning my otherwise picturesque .bashrc into an eyesore!
Thanks!
...
Hi
to all
In my iphone game I want to add external .h and .a files. I am adding them by using add project option given in Xcode. It get added but I want to invoked the methods given in the header files. As per instruction given to us we have to call one method which is declared in external header file. We have to call that method insi...
I have two very large files (and neither of them would fit in memory). Each file has one string (which doesn't have spaces in it and is either 99/100/101 characters long) on each line.
Update: The strings are not in any sorted order.
Update2: I am working with Java on Windows.
Now I want to figure out the best way to find out all the s...
I have a .NET app that allows users to upload images to a directory within the webapp and then view them. The problem is that the session gets lost when I upload or delete an image in the webapp directory. It seems that the app pool is getting recycled when I add images, and not just config or cs files.
I have seen this technique used i...
I'm trying to find all the files and folders under a specified directory
For example I have /home/user/stuff
I want to return
/home/user/stuff/folder1/image1.jpg
/home/user/stuff/folder1/image2.jpg
/home/user/stuff/folder2/subfolder1/image1.jpg
/home/user/stuff/image1.jpg
Hopefully that makes sense!
...
If i have a string variable that has:
"C:\temp\temp2\foo\bar.txt"
and i want to get
"foo"
what is the best way to do this?
...
i am concatenating a number of variables and i want to save that string as a file path.
is there a way it will automatically create all appropriate directories if they dont exist without having to check "if exists" on each one
for example . .
"C:\" + a + "\" + b+ "\" + d + "\" + d + ".txt"
...
I'd like to be able to show the progress of a file copy operation when copying files using Ruby (currently using FileUtils.cp) I've tried setting the verbose option to true but that just seems to show me the copy command issued.
I'm running this script from command line at the moment so ideally I'd like to be able to present something l...
I'm in the midst of some refactoring some C# code and part of this is to redo some references, because we're redoing the folder structure entirely. What I'd like to do is just go into the .csproj or .sln file and modify the paths.
However some of the references have paths like
"../../../../../../ThirdParty/SomeMicrosoftLibrary/bin/Debu...
Besides trying the operation and catching the exception, is there a method to determine if a file can be moved or copied?
...
I am using Google code svn and have a repository setup. Inside the repository I am including TinyMCE and now I want to upgrade all the files in this folder. The problem I am having is if I checkout locally and then download their new version and replace the folder it wipes out all my svn files. So in effect removes it from version cont...
I am using this to get all files in a directory:
string[] files = Directory.GetFiles(sourceDirectory_);
But is there a way to get all files that end with "jpg" in one line without doing an
if (file.endswidth("jpg")
check?
...
Is there any in-built class/method for comparing content of two audio/
video files?
Or is there any in-built class/method for converting a audio/video
file to bit stream?
...
I have two web-applications. One is an outwards-facing application that will be accessible from the internet. The other is an application to manage the first, that will only be accessible from the intranet.
They keep their data in files on the filesystem (I think a database would be overkill for these applications).
The management-appl...
I'm trying to read from an open os.pipe() to see if it's empty at the moment of the reading. The problem is that calling read() causes the program to block there until there is actually something to read there however there won't be any, if the test I'm doing succeeded.
I know I can use select.select() with a timeout however I wanted t...
What is the simplest way to get the directory that a file is in? I'm using this to set a working directory.
string filename = "C:\MyDirectory\MyFile.bat"
In this example, I should get "C:\MyDirectory".
...
I am working on a Unix system. I have a directory of files called MailHistory. Each file in the directory contains all of the emails for the previous day.
The files are created at midnight and named with the timedatestamp. So, a typical filename is 20090323000100.
I have a file that has a list of names. Using this file as input, I...
Hi
My PHP script writes to a file so that it can create a jpg image.
fwrite($handle, $GLOBALS['HTTP_RAW_POST_DATA']);
fclose($handle);
print $newfile.'.jpg';
I have put this script on a new server however the image never gets saved. The permission of the folder it saves to is 755 but it does not own it. Last time, I think I fixed...