filesystems

Map a file share so it is accessible for IIS

I have a file share on a machine. On another machine I have IIS and a webapp running. Through the webapp, I want to be able to offer files from the share for download. On the IIS machine, how can I persistently map the fileshare drive to say drive Z:? If I map the drive with a regular user, the mapping disappears when the user session e...

How to mock a file with EasyMock?

Hello, I have recently been introduced to EasyMock and have been asked to develop some unit tests for a FileMonitor class using it. The FileMonitor class is based on a timed event that wakes up and checks for file modification(s) in a defined list of files and directories. I get how to do this using the actual file system, write a tes...

How can we receive a volume attaching notification

When a volume is attached to file system, on Windows, the Window explorer detects the volume and refreshes automatically. I wonder the technique. How do an program(include device driver) get the notification? -Of course, it doesn’t mean a polling. I want to get an event(or a message). I would like to get the notification when a network...

Determine whether a folder is present?

How would I go about determining whether a file or directory has been created in Java? I basically want to create a data directory if one is not already present. Thanks. ...

file.createNewFile() creates files with last-modified time before actual creation time

I'm using JPoller to detect changes to files in a specific directory, but it's missing files because they end up with a timestamp earlier than their actual creation time. Here's how I test: public static void main(String [] files) { for (String file : files) { File f = new File(file); if (f.exists()) { ...

Simple Oracle File repository with folder hierarchy

I have an application that stores large amount of files (XML and binary) in folder hierarchies. Currently the main method is storing them in file system or using a legacy CMS, which we want to get rid of. The CMS supports Oracle and a customer wants to keep the files in Oracle because of enterprise policies (backup etc.) The question i...

Determine file creation date in Java

Hello, There is another similar question to mine on StackOverflow (How to get creation date of a file in Java), but the answer isn't really there as the OP had a different need that could be solved via other mechanisms. I am trying to create a list of the files in a directory that can be sorted by age, hence the need for the file creat...

Someone knows a good File System API?

I need options for API's that handle file systems. I know Dokan, do you know others? ...

Maximum filename length on Blackberry

Is there a maximum filename length (or equivalent to MAX_PATH) on the BlackBerry operating system? ...

Blank space after file extension -> weird FileInfo behaviour

Somehow a file has appeared in one of my directories, and it has space at the end of its extension - its name is "test.txt ". The weird thing is that Directory.GetFiles() returns me the path of this file, but I'm unable to retrieve file information with FileInfo class. The error manifests here: DirectoryInfo di = new DirectoryInfo("c...

How are files (especially audio files) organized internally?

I try to grok that: Apple is talking about "packets" in audio files, and there is a fancy function called AudioFileReadPackets which takes a lot of arguments. One of them specifies the "start packet", and another one the number of packets which you want to read. So I imagine an audio file to look like this, internally: It's made up of a...

How do filesystems handle concurrent read/write?

User A asks the system to read file foo and at the same time user B wants to save his or her data onto the same file. How is this situation handled on the filesystem level? ...

Basic concepts in file system implementation

I am a unclear about file system implementation. Specifically (Operating Systems - Tannenbaum (Edition 3), Page 275) states "The first word of each block is used as a pointer to the next one. The rest of block is data". Can anyone please explain to me the hierarchy of the division here? Like, each disk partition contains blocks, blocks...

Understanding the concept of Inodes

I am referring to the link: http://www.tux4u.nl/freedocs/unix/draw/inode.pdf I am confused on parts: 12 direct block pointers 1 single indirect block pointer 1 double indirect block pointer 1 triple indirect block pointer Now the diagram says that each pointer is 32/64 bits. [Query]: Why and how are these values inferred? I mean w...

Grabbing windows file information.

In C following this article (http://blogs.msdn.com/oldnewthing/archive/2006/12/21/1340571.aspx), we have succesfully been able to grab the file version information out of windows files however there are some files that seem to have a different mechanism for storing the version information that is not addressed in the article and was wond...

NoSQL for filesystem storage organization and replication?

We've been discussing design of a data warehouse strategy within our group for meeting testing, reproducibility, and data syncing requirements. One of the suggested ideas is to adapt a NoSQL approach using an existing tool rather than try to re-implement a whole lot of the same on a file system. I don't know if a NoSQL approach is even...

How to get started on implementing a distributed filesystem?

What resources would you recommend I look into to get started on implementing a basic distributed filesystem? Are there any open source distributed filesystems that are simple enough to be a good starting point? ...

How can I convert my Stream (image data) back into a file

I have a WCF restful service that I'm trying to upload an image to. I have a very basic metod that accepts a stream as it's only parameter and is defined in the contract as: [OperationContract] [WebInvoke(UriTemplate = "ReviewImage", BodyStyle = WebMessageBodyStyle.Bare, Method = "POST")] ReviewImage UploadImage(Stream data); I'm act...

What's the difference between PATH_NOT_FOUND and NAME_NOT_FOUND

In Win32 layer, we often meet ERROR_PATH_NOT_FOUND, ERROR_NAME_NOT_FOUND. When does WinAPI(eg CreateFileW, RemoveDirectoryW) return these values? And What's the difference? If I write a file system driver, when do I set STATUS_OBJECT_PATH_NOT_FOUND or STATUS_OBJECT_NAME_NOT_FOUND? How do you determine? I'm so confused. Is there anyon...

monitor and kill runaway processes using 100% IO?

Hello everyone, i have a few processes that have to be run at high priority (chrt 98) that will occasionally decide to hard-lock and peg 1 core at 100% (not a huge deal) but more importantly it will use all the IO on a system, so much that its impossible to log into the machine via ssh to kill it or perform any task on the machine that i...