filesystems

Filesystem filename escape? C#

I am allowing the user to choose any username he wants and it can be anything at all such as AC♀¿!$"Man'@ Now i need to create a directory for him. What function i use to escape the text so i dont a FS problem/exception? ...

What is the best Linux filesystem for MySQL (InnoDB)?

I tried to look for benchmark on the performances of various filesystems with MySQL InnoDB but couldn't find any. My database workload is the typical web-based OLTP, about 90% read, 10% write. Random IO. Among popular filesystems such as ext3, ext4, xfs, jfs, Reiserfs, Reiser4, etc. which one do you think is the best for MySQL? ...

Implementing a virtual file system in .NET

A while back a found a great-looking framework that allowed .net developers to implement a virtual file system. I thought I had bookmarked it, but it seems I haven't. Does anyone know any frameworks for doing this? EDIT: Here's a hint... It had a catchy, short name and it's own domain. Sorry, that's all I can remember :p ...

What are the file system of CD and DVD ?

We have NTFS, FAT etc for HDD. So I just want to know what are the file systems of CD and DVD? ...

Method to intercept child process filesystem activity

I have a small command-line application written in C that acts as a wrapper/launcher for other programs (think: xargs). The application is written to compile on FreeBSD/Linux (via fork()/exec()) and Windows (CreateProcess()). In addition to being able to intercept, inject, or otherwise manipulate the command-line arguments for the chil...

What is a good way to find the latest created file in a folder in c#?

I have a network folder which can contain up to 10,000 files (usually around 5000). What is the fatest way I can get the filepath of the most recently created file in that folder using c#? Currently I am using the below, but wondered if there was a quicker way. Thanks. DirectoryInfo di = new DirectoryInfo(xmlFileLocation); var feedFi...

How to retrieve a list of directories QUICKLY in Java?

Suppose a very simple program that lists out all the subdirectories name of a given directory. Sound simple enough? Except the only way to list all subdirectories in Java is to use FileameFilter combined with File.list(). This works for the trivial case, but when the folder has say 150,000 files and 2 sub folders, it's silly waiting th...

How can I quickly create large (>1gb) text+binary files with "natural" content? (C#)

For purposes of testing compression, I need to be able to create large files, ideally in text, binary, and mixed formats. The content of the files should be neither completely random nor uniform. A binary file with all zeros is no good. A binary file with totally random data is also not good. For text, a file with totally random seq...

Distributed file system for .NET

Lately I've been reading up on HDFS (Hadoop) and GFS (Google) and find myself wondering if there are any similar native implementations for windows and/or .NET. A lot of the applications I develop include features to support user generated content, and currently, that means relying on some type of storage service such as Mosso or S3, or ...

Versioned File System like web interface

Hi ! I'm trying to find a free software that would provide a web interface to a file system (so you can add / remove files / directories, possibly edit them). If possible, it should handle versioning (only simple things needed : back to previous versions), and user management. Can you point me to anything like that ? thanks Update1 : ...

Unpacking an executable from within a library in C/C++

I am developing a library that uses one or more helper executable in the course of doing business. My current implementation requires that the user have the helper executable installed on the system in a known location. For the library to function properly the helper app must be in the correct location and be the correct version. I wo...

Reading from a file not line-by-line

Assigning a QTextStream to a QFile and reading it line-by-line is easy and works fine, but I wonder if the performance can be inreased by first storing the file in memory and then processing it line-by-line. Using FileMon from sysinternals, I've encountered that the file is read in chunks of 16KB and since the files I've to process are...

How do I create a directory and parent directories in one Perl command?

In Perl, how can I create a subdirectory and, at the same time, create parent directories if they do not exist? Like UNIX's mkdir -p command? ...

Lots of small files or a couple huge ones?

In terms of performance and efficiency, is it better to use lots of small files (by lots I mean as much as a few million) or a couple (ten or so) huge (several gigabyte) files? Let's just say I'm building a database (not entirely true, but all that matters is that it's going to be accessed a LOT). I'm mainly concerned with read performa...

How to generate a OS independent path in c++

I have a destination path and a file name as strings and I want to concatenate them with c++. Is there a way to do this and let the program/compiler choose between / and \ for windows or unix systems? ...

Windows Invariant Culture Puzzle

I have a question about the windows invariant culture. Succinctly, my question is: does there exist any pair of characters c1, and c2 such that: lower(c1, invariant) =latin-general lower(c2, Invariant) but lower(c1, invaraint) !=invariant lower(c2, invariant) Background: I need to store an invariant lower case string (represen...

How to Add file to the folder only if the file doesnt exist using C#

Hi, I have a template file in a folder " c:\template_folder". At runtime, I will create a new folder " c:\new_folder" and wish to copy the template file to the new_folder only if the file doesnt exist. description: for the first time, I will copy the template file to the new_folder and rename it with username... so that after first ...

Has Windows 7 Fixed the 255 Character File Path Limit?

As I understand it, the limitation of 255 characters in a file path is a Windows limitation. What is the reasoning for this? If so, has this been resolved in Windows 7? In our continuous integration practices, we often have deeply nested project structures and it would be extremely useful to be able to go beyond 255 characters. Right no...

Why shouldn't I use spaces in file names when I can use a code equivalent?

I've read all over the place NOT to use spaces in file names intended for use on the Web, e.g. URLs. I don't understand what's wrong with using "%20" to replace them when referring to the name in my code. It seems more appropriate to use this replacement because I'm then preserving semantic meaning of my file name. ? ...

Determining if a file has write access in .NET

I have created a software product, that acts like the Apache mod_rewrite, but for .NET. One of the requirements is to support the RewriteLog command which sets a path for logging. This works fine, however the biggest issue I run in to is that users set a path that the IIS user doesn't have access to. I would like to throw an excepti...