filesystems

file name matching with wildcard

Hello, I need to implement something like my own file system. One operation would be the FindFirstFile. I need to check, if the caller passed something like ., sample*.cpp or so. My "file system" implementation provides the list of "files names" as a array of char*. Is there any Windows function or any source code that implements this ...

Does PHP wait for filesystem operations (like file_put_contents) to complete before moving on?

Hey all, I have a question about how PHP handles filesystem operations. I'm running this code that depends on a file being created before it gets used, and it feels like when I run the code it becomes a race condition - sometimes the it works, the file is created and php code uses it, sometimes it fails. So I was wondering how php han...

Write to directory without needing 777 permissions

Is this possible with php? ...

Why does Windows start chkdsk at boot time?

We have a file system filter driver. It has a feature which encrypts some files. We implemented this feature yesterday, but after shipping the feature, when we reboot sometimes Windows will check the file system by running chkdsk. Has anyone else developing filter drivers encountered this problem? How can we solve this? ...

How can one detect changes in a directory across program executions?

I am making a protocol, client and server which provide file transfer functionality similar to FTP (among other features). One difference between my protocol and FTP is that I would like to store a copy of the remote server's directory structure in a local cache. The server will only be running on Windows (written in C++) so any applic...

Is there a way to hook into the windows file system so that for a particular directory I controlled every bit with custom code?

I'm interested to know if there's any method/mechanism to roll my own virtual file system that will run on modern windows. The idea would be that no matter what part of the operating system tried to access files under the directory I "control", all of the operations are filtered through some kind of callback code. If not, is there a fu...

Need to find a way to programmatically delete undeleteable empty folders

I've got a large folder on an offsite backup machine that gets populated with files by rsync (through deltacopy) every night (running windows xp) from the main work site. I've discovered some annoying folders that cannot be opened, or deleted, or even checked for file sizes. I get the such and such a folder is not accessible, access is d...

How can I enumerate filesystems from Python?

I'm using os.statvfs to find out the free space available on a volume -- in addition to querying free space for a particular path, I'd like to be able to iterate over all volumes. I'm working on Linux at the moment, but ideally would like something which returns ["/", "/boot", "home"] on Linux and ["C:\", "D:\"] on Windows. ...

Using .NET is it possible to assign a custom property to a built in object such as FileSystemWatcher?

Is it possible to add a custom property to an object that is part of the .NET framework? I know how I would do this if I was just giving a class i'd wrote a property, but what about adding a custom property to the FileSystemWatcher class? I'm loading in the Path I want to watch from an XML file, but also want to add a property to store...

Prototyping a filesystem

What are some best practises for prototyping a filesystem? I've had an attempt in Python using fusepy, and now I'm curious: In the long run, should any respectable filesystem implementation be in C? Will not being in C hamper portability, or eventually cause performance issues? Are there other implementations like FUSE? Evidently c...

fuse utimensat problem

Hi. I am developing fuse fs at python (with fuse-python bindings). What method I need to implement that touch correctly work? At present I have next output: $ touch m/My\ files/d3elete1.me touch: setting times of `m/My files/d3elete1.me': Invalid argument File exists "d3elete1.me": $ ls -l m/My\ files/d3elete1.me -rw-rw-rw- 1 r...

Accessing linux file system in a C# program.

Hi all, I am programming a C# application that checks the last time a file was modified on 3 different servers, one of these being linux. Being a different file system what are the possible ways to check when said file was last modified on the system. I have full access to modifying the server to an extent but I am looking for a number...

using stat to detect whether a file exists (slow?)

I'm using code like the following to check whether a file has been created before continuing, thing is the file is showing up in the file browser much before it is being detected by stat... is there a problem with doing this? //... do something struct stat buf; while(stat("myfile.txt", &buf)) sleep(1); //... do something else alt...

Seeking specification for ext3, ext4, especially the superblock

Writing a lightweight file system recovery application, I need to understand how to identify ext/ext/ext/ext4 superblocks on a disk. Googling for a spec, all I found are pages that explain how to use ext4, but none with specs for it, not even for ext3. Yeah, I could read the source code. But the source code wouldn't specify what's supp...

Getting Extra Information From WinAPI File Change Notifications

The MSDN has a pretty good example of getting notified when a file or directory is changed. However, I can't find any way to get extra information such as the user/machine name associated with the change notification. For example, I've setup a share X:\Foo from my machine. I would like to log the user/machine names that make changes t...

Java detect changes in filesystem

I have a folder in which continuously new files are being dumped.In Java,what is the best way to detect changes in file-system (ie. a specified folder in which the files are being dumped) and add the newly arrived files to a queue data structure so that i can sequentially process each incoming file. I'm aware of listFiles() function in ...

Create multiple SquashFS partitions

Hello I'm working on embedded platform (Broadcom's bcm5358u processor with MIPS core), where I need extra partitions for the purpose of further upgrade procedure. The filesystem used is SquashFS, so I modified 'struct mtd_partition' accordingly, which is passed to MTD related code, and I ended up with this: #cat /proc/partitions major ...

Difference between Blob and a file

Hey! What is the difference between saving a file (e.g. AVI) as a Blob in the datastore to saving it as a normal AVI file on a webserver? Thanks! Joel ...

Eclipse RCP File Browser in ViewPart or Editor?

I am implementing a file browser, in Eclipse RCP, using a TreeViewer. Would it be best to put it in an Editor or ViewPart. I ask because, I need to be able to pass the root path for the browser and do not know of a way to do so with a view. As views are not instantiated directly. ...

NTFS Filesystem Time

I tested this on windows xp. If I do Create a file. Write to the file. Close the file.(Then, the file's LastWriteTime is changed) But if I do Create a file. Set LastFileTime of the file. Examine the time by calling GetFileTime (Then, the file's LastWriteTime is changed) Sleep 20 seconds. Write to the file. Sleep 20 seconds. Close ...