filesystems

How to quickly find added / removed files?

I am writing a little program that creates an index of all files on my directories. It basically iterates over each file on the disk and stores it into a searchable database, much like Unix's locate. The problem is, that index generation is quite slow since I have about a million files. Once I have generated an index, is there a quick w...

Should I fsck ext3 on embedded system?

We have a number of embedded systems requiring r/w access to the filesystem which resides on flash storage with block device emulation. Our oldest platform runs on compact flash and these systems have been in use for over 3 years without a single fsck being run during bootup and so far we have no failures attributed to the filesystem or ...

Fastest way to deliver images via asp.net

I am wondering which way is the fastest to deliver images via ASP.net: //get file path string filepath = GetFilePath(); Response.TransmitFile(f); or: string filepath = GetFilePath(); context.Response.WriteFile(f); or Bitmap bmp = GetBitmap() bmp.Save(Response.OutputStream); or any other method you can think of ...

How many sub-directories should be put into a directory

At SO there has been much discussion about how many files in a directory are appropriate: on older filesystems stay below a fey thousand on newer stay below a few hundred thousand. Generally the suggestion is to create sub-directories for every few thousand files. So the next question is: what is the maximum number of sub directories I ...

What are all the ways to traverse directory trees?

How do you traverse a directory tree in your favorite language? What do you need to know to traverse a directory tree in different operating systems? On different filesystems? What's your favorite library/module for aiding in traversing a directory tree? ...

How can I hide a directory in C# with a file system driver?

I want to develop a program that can hide a folder. Not a hidden attribute, but a real hiding so that no applications can find it. I think for that I need to create a file system driver. How can I do it in C#? ...

How to copy a directory and its contents to an existing location using Python?

I'm trying to copy a directory and all its contents to a path that already exists. The problem is, between the os module and the shutil module, there doesn't seem to be a way to do this. the shutil.copytree() function expects that the destination path not exist beforehand. The exact result I'm looking for is to copy an entire folder s...

Windows API way to search subfolders with wildcards and other criteria in C++?

I think I saw once that it was possible to use the functionality of windows' search feature(s) in code. That it was possible to search for files using a sql query (something like "select filename from filestore where directory = 'c:\somedir' and extention in ('.doc','.txt','.me') and datemodified >= '2009-01-01 00:00:00'" Anyway, even ...

Example of using FindFirstFIleEx() with specific search criteria.

I asked about finding in subdirs with criteria. First answer was use FindFirstFileEx(). It seems the function is no good for this purpose or I'm using it wrong. So can someone explain how I would go about searching in a folder, and all it's subfolders for files that match (to give some sample criteria) .doc;.txt;*.wri; and are newer ...

Find the path of notepad.exe and mspaint.exe

What is the best way to find out where is notepad.exe and mspaint.exe that will work across various versions of Windows? Should I get the Windows directory via SHGetFolderPath(NULL, CSIDL_WINDOWS, NULL, SHGFP_TYPE_CURRENT, dir), and then traverse through all the subdirectories to look for the two files? (Assume that I am not interested...

How can I find out the file system being used in Windows? Preferably in code.

How can I find out the type of file system being used in Windows? Preferably in code. ...

What is a root directory?

I know what a root directory is, of course, but I am finding it very difficult to explain to people what it is. I wrote a Nintendo DS application that requires a folder to be copied to the root directory of your memory card, and I often get e-mails from people who copied it to the wrong place and don't understand what the root directory ...

Best Way to Transfer Large Files in Windows

I often have to transfer large files >50GBs sometimes >100GBs between drives both internal and external during backups of our networks email servers. What is the best method of transferring these files? Command Line such as XCOPY? Possibly something robust enough to continue the transfer if interrupted due to time limits or network is...

Exception when ASP.NET attempts to delete network file.

Greetings - I've got an ASP.NET application that is trying to delete a file on a network share. The ASP.NET application's worker process is running under a domain account (confirmed this by looking in TaskManager and by using ShowContexts2.aspx¹). I've been assured by the network admins that the process account is a member of a group t...

Manage local SVN file structures with PHP

Hello all, I have a developer tool that modifies the local file system using php. These projects are often checked out from SVN. The issue that I would like to avoid is the moving / deleting / renaming of version controlled directoires - and the breakage that occurs to a checked out SVN when doing those alterations locally. Is there...

How to determine number of files on a drive with Python?

Howdy! I have been trying to figure out how to retrieve (quickly) the number of files on a given HFS+ drive with python. I have been playing with os.statvfs and such, but can't quite get anything (that seems helpful to me). Any ideas? Edit: Let me be a bit more specific. =] I am writing a timemachine-like wrapper around rsync for va...

User images - database vs. filesystem storage

I’m writing an upload function in .NET for presentation images on user profiles. I’m choosing between two different ways of doing it, and would like to ask on advice and opinions as to the pros and cons. Store the images directly on the file system Store the images in the database So far I’ve been mostly pro the first option – naming...

ramdisk with a file mirror

I wanted to speed up compilation so i was thinking i could have my files be build on a ramdisk but also have it flushed to the filesystem automatically and use the filesystem if there is not enough ram. I may need something similar for an app i am writing where i would like files to be cached in ram and flushed into the FS. What are my ...

Can I use JNDI to access FIles/their content?

Can JNDI be used in a Java servlet to access filesystem on the local machine or a remote machine? I am able to bind local directories/files with it, but not able to find a mechanism(if exists) to read/modify the file's contents. The files are simple text files. Please tell me if it is possible, and how? ...

Monitoring files/directories with python

I'm looking for a cross-platform file monitoring python package? I know it is possible to monitor files on windows usung pywin32, and there are packages working on Linux/Unix but does anyone know about a cross-platform one? ...