files

Share file storage index with multiple open applications in Java

Hello. I'm writing an HTTP Cache library for Java, and I'm trying to use that library in the same application which is started twice. I want to be able to share the cache between those instances. What is the best solution for this? I also want to be able to write to that same storage, and it should be available for both instances. Now...

Delete a file in use in runtime

how to delete a file which is in use/open by some process in runtime. i am using vb.net for my project and a image is shown in picturebox. and that should be deleted, with out closing that file. thanks in advance, vijay ...

How do I remove/delete a folder that is not empty with Python?

I am getting an 'access is denied' error when I attempt to delete a folder that is not empty. I used the following command in my attempt: os.remove("/folder_name"). What is the most effective way of removing/deleting a folder/directory that is not empty? Thanks in advance. ...

How do I get a list of files in a directory in C++?

How do you get a list of files within a directory so each can be processed? ...

With Python, how can I ensure that compression of a folder takes place within a particular folder?

I have been able to zip the contents of my folder. But I would like the zipped file to remain in the folder that was just compressed. For example, I've zipped a folder called test in my C: drive. But I would like my "test.zip" file to be contained in C:\test. How can I do this? Thanks in advance. clarification of question with code exam...

How to modify http-headers on static files served by JBoss

I have a web application (.war) that contains some static files (e.g. MS word documents). When I try to download these files, JBoss automatically sets some HTTP-headers in the response. Is there a way to configure JBoss (version 3.2.7) to set these headers to specific values (or omit them)? I'm especially interested in the Cache-Contr...

Recursive directory listing using Ruby with Chinese characters in file names

I would like to generate a list of files within a directory. Some of the filenames contain Chinese characters. eg: [试验].Test.txt I am using the following code: require 'find' dirs = ["TestDir"] for dir in dirs Find.find(dir) do |path| if FileTest.directory?(path) else p path end end end Running the script...

Includes: SSI or PHP for basic HTML and Javascript in separate files

Thanks to everyone here, got the Xampp server running!!! and can run my html in subdirectories now, as well. (can't have spaces in the subdirectory names) NEXT UP - SSI Includes or PHP Includes Xampp says SSI is deactivated. Tried uncommenting the lines for includes, but it doesn't change the deactivation. How do I activate SSI? Then...

Windows Programming: How to put a file that is frequently accessed in the OS cache?

Windows Programming: How to put a file that is frequently accessed in the OS cache? ...

java - determining if a file is a link

Title says it all. How do you do it, or is it even possible? I suppose you could fiddle with getCanonicalWhatever and the original path, but that's messy and I don't like it. Please include a definitive reason if you suggest it. ...

What's the best way to open and read a file in Perl?

Edit on 11/26 - Please note - I am not looking for the "right" way to open/read a file, or the way I should open/read a file every single time. I was just interested to find out what way most people use, and maybe learn a few new methods at the same time :) A very common block of code in my perl programs is opening a file and reading o...

What is the difference between HANDLE and HFILE in WinAPI?

WinAPI OpenFile function returns HFILE, and GetFileTime for instance needs HANDLE. When I feed it with (HANDLE)some_hFile it seems to work fine. Is there any difference in this types, or one of these is simply rudimental? ...

Text file split libraries in Java

My program receives large CSV files and transforms them to XML files. In order to have better performance I would like to split this files in smaller segments of (for example) 500 lines. What are the available Java libraries for splitting text files? ...

How to get the name of an open file?

Hi all, I'm trying to store in a variable the name of the current file that I've opened from a folder... How can I do that? I've tried cwd = os.getcwd() but this only gives me the path of the folder, and I need to store the name of the opened file... Can you please help me? Thanks. ...

How does Windows determine/handle the DOS short name of any given file?

I have a folder with these files: alongfilename1.txt <--- created first alongfilename3.txt <--- created second When I run DIR /x in command prompt, I see these short names assigned: ALONGF~1.TXT alongfilename1.txt ALONGF~2.TXT alongfilename3.txt Now, if I add another file: alongfilename1.txt alongfilename2.txt <--- created third ...

Windows temporary files behaviour - are they deleted by the system?

Using the .net framework you have the option to create temporary files with Path.GetTempFileName(); The MSDN doesn't tell us what happens to temporary files. I remember reading somewhere that they are deleted by the OS when it gets a restart. Is this true? If the files aren't deleted by the OS, why are they called temporary? They are...

Listing Files With CheckBoxes (C# / WinForms)

I want a way to list files in a directory and putting a check box beside each one of them so I can select some of them and perform operations with each selected file, what's the best way to do this? ...

Posting base64 encoded files to an asp.net 1.1 page

We are making an automated patching application and would like to post files on production server through asp.net page (or maybe a web service), since we can only access production server via http. The page should accept files and store them to appropriate location. The path to files will be declared in external XML file. So, is it possi...

How do I modify the last line of a file?

The last line of my file is: 29-dez,40, How can I modify that line so that it reads: 29-Dez,40,90,100,50 Note: I don't want to write a new line. I want to take the same line and put new values after 29-Dez,40, I'm new at python. I'm having a lot of trouble manipulating files and for me every example I look at seems difficult...

Static Variables, Separate Compilation

Hi, I wrote a program out, which was all in one file, and the methods were forward declared in a header. The program initially worked perfectly when it was in one file. But when I separated the program, I kept getting random occurrences for the destructor of one of the classes which was declared in the header file. I have a static v...