file

putting file on blackberry emulator file system

Hello. I need to put a video file on the file system of the Blackberry emulator to test the app I'm writing. I can't figure out how to do this. How can I copy a file from my computer's file system onto the simulator's file system? ...

opening file stored on internet via c++.

need a small program to learn basics on how to open a file stored on net for reading via c++. ...

High Performance File Manipulation & I/O completion threads

Two questions: I need to make a server that handles potentially thousands of simultaneous requests for: Hashing of files Compression of files Decompression of files Possibly some file copy / moves as well I can't control a customer's hardware (RAID configurations, etc) so I assume all I can do is request hundreds of file operations,...

How to get the total time an application spends on reading/writing from/to the file system?

I am now profiling an application, who does a lot of disk I/O. At this point, I want to know how much time is spent on disk I/O. So that, I could make a comparison between I/O and the whole execution time, in order to decide the next target of optimization. In short, I am seeking tools or methods to: Calculate and summary the total t...

PLY file to be divided into chunks

I have a ply file which creates a 3d model. I wish to render the 3d model in distributed framework. What I want to ask is how can I divide my ply file into different bounding boxes(frustums) so that each node renders one bounding box and then the master just stitches up every bounding box. ...

how to read files with spaces and special characters in their name?

i have lots of videos in my server and i use the following code to get the duration of the video and it works fine.. ob_start(); passthru("ffmpeg -i ".$srcfile." 2>&1"); $duration = ob_get_contents(); ob_end_clean(); But i could not get the duration for the files which has a space or any special charac...

Copying contents of one file to another in C++

I am using the following program to try to copy the contents of a file, src, to another, dest, in C++. The simplified code is given below: #include <fstream> using namespace std; int main() { fstream src("c:\\tplat\test\\secClassMf19.txt", fstream::binary); ofstream dest("c:\\tplat\\test\\mf19b.txt", fstream::trunc|fstream::binary);...

Passing file paths from Flash to JavaScript for upload?

Hello everybody, first of all my question: Is it possible to pass file names from a running Flash application, which only purpose is to enable multiple-file-selection, to a JavaScript application which handles upload of all files to the server? I have examined various Flash upload solutions (like SWFUpload, Uploadify, etc.) and none of...

AS3 / AIR - Creating a plain text file?

is it possible to create a plain text file with AS3 or AIR? example: i would like to create a plain text file named "MyTextFile.txt", have it contain text that reads "This is my text file." and save it to my desktop. another option would be to have the file already exist in a directory, so i would only have to rewrite its contents - a...

How to download a file without extension in C#

Okay so I want to download a file from a website, but the file is lacking an extension. (it's an image file, I know this much, but the link does not provide the actual extension) When I use webrequest, or webclient to download the file I get a "404 file not found" exception. WebClient wc = new WebClient(); Stream strm ...

Fastest way to read long[] from file?

I have a file that contains about 200,000 long values that I want to read as fast as possible into a long[]. It's for an Android app; function calls are slow (so anything involving reading a long at a time with a "for" loop will be super slow) and I need loading to be fast. What can I use? Everything I look at seems to read only bytes fa...

In C, How to exit a loop based on file contents

I'm attempting to exit a while loop, based on file contents. File exists and is empty, or garbage filled at initialization of the program. I externally modify the file, and would like the loop to exit upon this happening based on how the file was modified. Currently, I start a few threads, open the file that I'm reading from. Check the ...

Trying to make a program that imitates a Process Table

Hello,I am trying to create a program that is just like a Process Table. I have to implement a class PCB (Process Control Block) with several fields such as:process name (a string) process priority (an integer) register set values (an object of a class Register Set containing the following fields: XAR, XDI, XDO, PC. Then my program ne...

Reading a binary file as text and manipulating it... [C#] Versus [VB.NET]

Well guys I am in a bit of a pickle here... I am doing some exercises on encrypting data. One of them are binary files. I am currently using triple DES to encrypt and decrypt the files both in VB.NET and C#... Now the thing is, once it is decrypted in VB.NET and saved, i can execute it again... But for some reason, my C# file is bigge...

Extract data from large structured file using Java/Python

I have a large text file (~100MB) that need to be parsed to extract information. I would like to find an efficient way of doing it. The file is structured in block: Mon, 01 Jan 2010 01:01:01 Token1 = ValueXYZ Token2 = ValueABC Token3 = ValuePQR ... TokenX = Value123 Mon, 01 Jan 2010 01:02:01 Token1 = ValueXYZ Token2 = Val...

Need to generate every unique combination of an array of files recursively

I've researched and found LOTS of similar requests, but nothing was quite what I needed. Here is my problem. I'm working in C#, and I have a FileInfo[] array with an unknown number of elements in it. FileInfo[] files = new FileInfo[] { new FileInfo(@"C:\a.jpg"), new FileInfo(@"C:\b.jpg"), new FileInfo(@"C:\c.jpg"), new...

Android Development: File Browser For Reading/Saving Files

Does anyone know any good tutorials for this please? Or could anyone run me through some basic code for making this? Please & thank you, Alex. ...

Get full path without filename from path that includes filename

Is there anything built into System.IO.Path that gives me just the filepath? For example, if I have a string @"c:\webserver\public\myCompany\configs\promo.xml", is there any BCL method that will give me "c:\webserver\public\myCompany\configs\"? ...

PHP list all files in directory

I have seen functions to list all file in a directory but how can I list all the files in sub-directories too, so it returns an array like? $files = files("foldername"); So $files is something similar to array("file.jpg", "blah.word", "name.fileext") ...

How can we check if a file Exists or not using Win32 program?

How can we check if a file Exists or not using a Win32 program? I am working for a Windows Mobile App. ...