filesystems

Can I use tmpfs in this way?

I have plenty of RAM on my development machine. Can I move my Rails' application sources to the tmpfs partition in order to gain performance boost because of in-memory storage which is order of magnitude faster than HDD? I understand that tmpfs is temporary storage by its nature BUT can I use it for this task if I'll write some script ...

Check file name is valid windows name

Hello I wanna check if my string is valid windows file path. I was searching around and it seems that there is no reliable method to do that. Also I checked boost filesystem library , and no obvious function exist to do this check , maybe something like is_valid_windows_name ...

Robustness of file handling in windows mobile against power failure (data recovery)

I am writing a c# .net CF application for windows mobile 6, which does some file handling. I wanted to know if there is any built-in way to make the file handling robust against power failure. For instance, if there is a power failure while writing the file, the file contents should be intact without corruption(maybe there is loss of th...

Linux ext2 filesystem why is there a deletion time?

Hiya, the ext2 inode has a field i_dtime which is the deletion time. Until today i thought that the deletion of a file removes the inode. So does anyone know what the sense of this field is? Thanks! ...

Way to get unique filename if specified filename already exists (.NET)

Is there a built in .NET function to get a unique filename if a filename already exists? So if I try and save MyDoc.doc and it already exists, the file will save with name MyDoc(1).doc, the same way a browser download works for example. If not, what is the most efficient way to achieve this result? I am using the File.Move function at ...

Differentiate between a parameter that can take either file contents or file path in PHP

Hey all, I'm implementing a function called attach. I'm looking for a way to take a param that is either a file path or a file's contents. Here's what I have: /** * @param name - name of the file * @param file - either a file or a file path */ function attach($name, $file) { $attachment = array(); $attachment['name'] = $n...

ext3 code understanding

struct inode_operations ext3_dir_inode_operations = { .create = ext3_create, .lookup = ext3_lookup, } This struct is assign to inode structure and further to file system operation structure. My question is what is this flag .create? Do we do the assignment in the structure itself? Or is it some other ver...

Why is the concatenation of a set of files greater than the sum of the parts?

In an obscure way, it is a programming question. I concatenated several sets of text files in the range of 1MB and found that in each case the concatenated file size was much larger than the sum of the individual files by a large extent (2x-4x times more, even greater for Windows7). Why is this? ...

Will this work on Unix?

This Java code lists files in a directory on a Windows shared drive. Will it work correctly on a Unix system? File directory = new File("\\\\server/Shared/stuff/mystuff"); for (File file: directory.listFiles()) { System.out.println(file); } ...

Uploading files to server and storing files to disk with Spring Framework 3

I need to upload files to server and that part I have successfully done, but now I need to know what is best practise to save files that are related to database items to disk with Spring and how that is actually done with Spring. I thought it could be good way to use database table id in folder for example: context_path/table_name/id/f...

unmount fuse fs from python script

I have developed fuse fs with python and now want to write tests for it. Before testing I mount fs to some dir: fs = MyFuseFS() fs.parse(errex=1, ['some_dir']) fs.main() After testing I want unmount my fs, want to do something like this: fs.unmount() Is it something like "unmount" method? Maybe there is another ways...

boost::filesystem::rename: Cannot create a file when that file already exists

I'm renaming a file using boost::filesystem, and sometimes the target file will exist. According to the boost documentation here: http://www.boost.org/doc/libs/1_42_0/libs/filesystem/doc/reference.html#Non-member-functions template void rename(const Path1& from_p, const Path2& to_p); Requires: Path1::external_string_type and ...

How do I programmatically rename a file(pictre) once I have saved it to the iPhone?

The app basically takes a picture, saves the image to a file and stores the file location in coredata. From here I either choose to save/submit this image or discard it. If the file is saved I want to leave it alone, if it's submitted I want to take the response and name the image that file, and if it's discarded I don't want it. Idea...

Tmpfs metadata size

Is there a way to determine the amount of metadata stored for tmpfs given the partition size and the number of files and size of files currently on the fs? My goal is to determine the amount of space available for an additional file. Empirically I've been able to determine for one file below size 64k there doesn't seem to be any meta...

Does a file read from a Java application invoke a system call?

My understanding is that a user application requesting a file system path (eg. /aFile) will invoke the File System and get back the virtual address of the requested file. Then the application will attempt a read/write operation with that address as argument, that as a CPU instruction? On execution of the read command the Memory Managemen...

Why can't DMBSes rely on the OS buffer pool?

Stonebraker's paper (Operating System Support for Database Management) explains that, "the overhead to fetch a block from the buffer pool manager usually includes that of a system call and a core-to-core move." Forget about the buffer-replacement strategy, etc. The only point I question is the quoted. My understanding is that when a DBM...

Creating a new file type

I am assigned a project to create a new binary file structure for storing co-ordinate information coming out of a 3d CAD/CAM software. I would highly appreciate if you kindly point out some articles or books regarding creation of new binary file format. Thanks for your time :) ...

Why are there so few versioning file systems?

I did some literature research about versioning file systems. Versioning was already common practice in the very early operating systems such as the influential but almost forgotten Incompatible Timesharing System (ITS) and TENEX. OpenVMS, the successor of TENEX, seems to be still used in special applications and it still supports versio...

Where is the location of the OS X 10.5 user wallpaper

I was just wondering where the /File/System/Location/ of a users current wallpaper is stored in OS X 10.5. Something like how the default login windows wallpaper is stored at /System/Library/CoreServices/DefaultDesktop.jpg ...

Best linux filesystem filter option?

I need a linux filesystem filter thingy with whitch to enforce ACL policy on filesystem calls dynamically (allow/deny read/writes based on stuff computed at runtime). So far I have stumbled onto DazukoFS and Related Work. What I dont like about DazukoFS is that it has to be compiled for each kernel release. Is there some user-mode libr...