filesystems

What are your experiences implementing/using WebDAV?

For a current project, I was thinking of implementing WebDAV to present a virtual file store that clients can access. I have only done Google research so far but it looks like I can get away with only implementing two methods: GET, PROPFIND I think that this is great. I was just curious though. If I wanted to implement file uploading ...

Choice of embedded database?

We are building an application on an embedded platform that needs a reasonably high performance database (very low select speeds on tables with > 500,000 entries). The database needs to be able to : Store atomic commit information in NVRAM so that such information is preserved if power fails before the commit finishes. Be written to N...

Determine what filesystem a partition is of

How does operating system know what filesystem a partition is using? In other words, how are FAT16/32, NTFS, ext2/3 etc. distinguished from each other? ...

Evaluate environment variables into a string

I have a string representing a path. Because this application is used on Windows, OSX and Linux, we've defined environment variables to properly map volumes from the different file systems. The result is: "$C/test/testing" What I want to do is evaluate the environment variables in the string so that they're replaced by their respect...

What's the best way to do a cross-platform, atomic file replacement in Perl?

I have a very common situation. I have a file, and I need to entirely overwrite that file with new contents. However, the original file is accessed on every page load (this is a web app), so it can't be missing for very long. A few ms is OK (though not ideal), a second is not OK. Right now I do this by writing a temp file to the same di...

Best file system to transfer 5+GB files between OS X and Windows on removable media

I need to transfer DVD image files between a Windows XP computer and a Mac running Leopard. The machines are not connected via a fast network, and I have a few USB drives floating around that I want to use, e.g. 8GB flash, 60GB and 250GB USB hard drives. Sometimes the files creep above 4GB (the maximum size of a single file on FAT32), ...

Speed of file transfer NFS vs. Microsoft Network Share?

I would like to know, if there are any performance differences using NFS instead of standard Microsoft Network Share? ...

Can ZFS mirror an entire hard drive in OpenSolaris?

I am upgrading an OpenSolaris development workstation and recently purchased two 500GB SATA hard drives expecting to use the features of the motherboard to mirror the drives. OpenSolaris doesn't recognize the drives when configured to be mirrored through the BIOS but it sees them just fine otherwise. Can ZFS mirror an entire drive and wi...

How to safely update a file that has many readers and one writer?

I have a set of files. The set of files is read-only off a NTFS share, thus can have many readers. Each file is updated occasionally by one writer that has write access. How do I ensure that: If the write fails, that the previous file is still readable Readers cannot hold up the single writer I am using Java and my current solution...

How to get date/time when file was placed in a directory on Windows?

Is there a way to tell when a file was moved to a certain directory? I'm being asked why a script of mine did not find a file in a certain directory. The file was created last January but I suspect it was placed in the directory after the script was run. Is there a way for me to confirm my suspicion? Viewing the file properties gives...

Filesystem seek performance with lots of tiny files

I'm looking to build a server with lots of tiny files delivered by an XML API. It won't be doing a whole lot of iterating over directories or blocks of sequential files--we're talking lots and lots of seeks for discontinuous data. Will seek time on BSD UFS degrade over time for requests for individual files? I understand that the files...

c# - Function to replicate the folder structure in the file path.

I need a simple function which will take a FileInfo and a destination_directory_name as input, get the file path from the fileinfo and replicate it in the destination_directory_name passed as the second parameter. for ex. filepath is "d:\recordings\location1\client1\job1\file1.ext the function should create the directories in the destin...

Storing a large number of images

I'm thinking about developing my own PHP based gallery for storing lots of pictures, maybe in the tens of thousands. At the database I'll point to the url of the image, but here's the problem: I know is impractical to have all of them sitting at the same directory in the server as it would slow access to a crawl, so, how would you store...

How can I show file sizes with commas when getting a directory listing with 'ls -l'?

You can do 'ls -l' to get a detailed directory listing like this: -rw-rw-rw- 1 alice themonkeys 1159995999 2008-08-20 07:01 foo.log -rw-rw-rw- 1 bob bob 244251992 2008-08-20 05:30 bar.txt But notice how you have to slide your finger along the screen to figure out the order of magnitude of those file sizes. What's a good w...

Algorithm for determining a file's identity

For an open source project I have I am writing an abstraction layer on top of the filesystem. This layer allows me to attach metadata and relationships to each file. I would like the layer to handle file renames gracefully and maintain the metadata if a file is renamed / moved or copied. To do this I will need a mechanism for calcu...

Determining if file exists using c# and resolving UNC path

I am trying to write a function to determine if a file exists. The two methods prove to return inconsistent results (fileExists() seems to provide accurate results, compared to isFileFound(), that returns false positives - i would have expected an exception when trying to create the instance). protected bool isFileFound(string path, st...

How many files in a directory is too many?

Does it matter how many files I keep in a single directory? If so, how many files in a directory is too many, and what are the impacts of having too many files? (This is on a Linux server.) Background: I have a photo album website, and every image uploaded is renamed to an 8-hex-digit id (say, a58f375c.jpg). This is to avoid filename...

How can I predict the size of an ISO 9660 filesystem?

I'm archiving data to DVD, and I want to pack the DVDs full. I know the names and sizes of all the files I want on the DVD, but I don't know how much space is taken up by metadata. I want to get as many files as possible onto each DVD, so I'm using a Bubblesearch heuristic with greedy bin-packing. I try 10,000 alternatives and get the...

Problem Linking Boost Filesystem Library in Microsoft Visual C++

Hello. I am having trouble getting my project to link to the Boost (version 1.37.0) Filesystem lib file in Microsoft Visual C++ 2008 Express Edition. The Filesystem library is not a header-only library. I have been following the Getting Started on Windows guide posted on the official boost web page. Here are the steps I have taken: ...

UNC Virtual Folder

I would like to expose some service functionality as a virtual file share to allow conventional applications to use the virtual folder as a real one. For example, a file path consisting of \\\\Server\VirtualShare\File.ext means that VirtualShare doesn't really exist and only available as long as my service is running. A file access wi...