filesystems

Writing a user mode filesystem for windows?

Is it possible to write a filesystem for Windows in pure usermode, or more specifically purely in managed code? I am thinking of something very similar to GMAILFS. Excluding what it is doing under the covers (GMAIL, Amazon, etc..) the main goal would be to provide a drive letter and support all of the basic file operations, and possibly ...

Which is the fastest search technique/method? (In context of file searching)

I don't know what they use in normal windows searching.But there is a technique in which you use indexing of files at once and then use the index later for faster searching.(e.g. Windows search 4.0) Is there any other way for faster searching than this? Can you elaborate from implementation point of view? (Assuming that I may need to im...

Storing and reading images above public_html

I am trying to secure my PHP Image upload script and the last hurdle I have to jump is making it so that users cannot directly excecute the images, but the server can still serve them in web pages. I tried changing ownership and permissions of the folders to no avail, so I am trying to store the images above public_html and display them ...

VBScript on checking if the records exist.

I have a table and a text file. Once the records in the table copied into textfile, the records will be deleted. But the table are still in used and will be inserted with a new records from time to time(by another program). I what to do checking on How to make sure that if there are no records in the table, the program will never copy i...

How to implement/use a secure 'read-once' local file access system?

Hi, does anybody know of a secure 'read-once' local file access system? Or how one might create one? I realise that if data is to be used on a system, then it must be capable of being read, but I think it may be possible to severely limit how data is made available and reduce the possibility of it being copied and used elsewhere. These ...

replace words using grep and sed in shell

I have some 150 files and in them I want to remove this following code: <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="/height.js"></SCRIPT> What I'm doing is: sed -e 's/<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="/height.js"></SCRIPT>/ /' file_names This doesn't seem to work. I want to remove this script...

Best way to watch process (and sub-processes) for file system read() I/O?

I would like to develop a command line program that worked like so: myprogram /c [some_executable_here] Which launched the command specified by the user and "watched" the process (and any sub-processes) for read I/O and when that program exits, print a listing of files that were "read" (ultimately resulted in a read() system call). My...

How to rollover the standard output from bash?

I have a script running in the background that prints some output. I redirected the standard output to a file for log purposes. However I don't want this file to grow forever, what would be a good way to do rollover without coding the logic myself? (Either rollover based on date or file size). ...

Is there a line length limit for text files created from Perl?

While writing a Perl script, I got a requirement to write the user names with comma separation in only one line of the file. That's why I would like to know is there any restriction on the maximum size of the line in the .txt file. ...

Keep a reference to a file after it has moved in objective-c?

I have a Cocoa application that stores a reference to multimedia files (images, videos, etc) on the user's computer. I'm wondering if there is a way to get a reference to that file other that using a file path so that if the user moves that file to a different folder on their computer, I would still know where it is. I'm currently stor...

Strange, possible “shadow copy” issue where two editors show different contents

I have some code that is reading a config file, but when I open the file in TextPad, I see different values than my application does. I checked it with Notepad. Notepad agrees with my application, TextPad shows something else. This is on Vista x64 Business. Any idea what could be causing this? I've looked in the Context Menu->Proper...

How to generate download file name?

I'm creating asp.net special file manager. all file information saved to SQL Server table. My table is here Table tFile( FileID uniqueidentifier, FileName nvarchar(50), Extension nvarchar(50)) Upload process is: First i'm insert table row and then upload file to server. Then file renamed to FileID (GUID value). For example : 4a6327c4-...

How to set file comment in c#

How to set any file comment, author information from c#? ...

List all drives/partitions, and get /dev/rdisc device with Cocoa

Is there a way to list available drives, similar to Disk Utility, and get the associated /dev/rdisk* device for it? Disk Utility has access to this data - when you select a drive and press the Info button, it lists.. Partition Map Scheme : GUID Partition Table Disk Identifier : disk0 Media Name : Hitachi HTS541612J9SA00 Media ..or se...

Fuse Filesystem Problem

Hi, i'm developing a fuse filesystem that stores data in the RAM, but i'm having problems when i write something to a file. The file turns into a blank file. Here's the code: #define FUSE_USE_VERSION 26 #include <fuse/fuse.h> #include <string.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> char hello_data[200] = {'h', 'e...

How do I write to a file immediately?

I want to keep a logfile, and I am using TextWriter/StreamWriter to write messages to my logfile. I call TextWriter.Flush() after writing the message, but my message still doesn't show up right away. It only shows up when I call Close, and I would rather not reopen and close the file all of the time just to see messages immediately. ...

How do I use filesystem functions in PHP, using UTF-8 strings?

I can't use mkdir to create folders with UTF-8 characters. <?php $dir_name = "Depósito"; mkdir($dir_name ); ?> But, when I browse this folder in Windows Explorer, the folder name looks like this: Depósito What should I do? ...

file reallocation tool for ntfs

Hi, I have an XP Virtual Machine and some of the files on the disk are allocated after a long free space, so when i try to reduce the size of the harddisk file of the VM. I tried to defrag the disk but it jus put most of the file at the first sectors of the disk and left the other files almost at the end of the disc. Do you know a tool...

Reading huge amounts of small files in sequence.

I have this problem: I have a collection of small files that are about 2000 bytes large each (they are all the exact same size) and there are about ~100.000 of em which equals about 200 megabytes of space. I need to be able to, in real time, select a range in these files. Say file 1000 to 1100 (100 files total), read them and send them o...

Custom Prefetch

Any programmatic techniques, portable or specific to NT and Linux that get the result of number of large files loading faster? I am after a 'ahead of time', a priori, whatever you prefer to call it mechanisms that I can control in code for two OS-es in question. Each file has to be processed in full, ie. completely in size and sequenti...