filesystems

Can NTFS-Search(An OSS project) scan any file on NTFS volume?

I want to apply NTFS-Search to our project. Our project have to find the files which we specified.(fast and exactly!) But I'm not sure the program(NTFS-Search) works well. What if the specified file is system file? What if the file is being opened by a process with NO_READ_SHARE_MODE? Do you think NTFS-Search can find any files? I don'...

How is fseek() implemented in the filesystem?

This is not a pure programming question, however it impacts the performance of programs using fseek(), hence it is important to know how it works. A little disclaimer so that it doesn't get closed. I am wondering how efficient it is to insert data in the middle of the file. Supposing I have a file with 1MB data and then I insert somethi...

YAFFS file path

Hi ALL, I am using YAFFS1 file system on RAM and I use the prefix "/ram" for YAFFS initialization i,e, I use the following structure for YAFFS initialization static yaffsfs_DeviceConfiguration yaffsfs_config[] = { { "/ram", &ramDev}, //{ "/boot", &bootDev}, //{ "/flash", &flashDev}, {(void *)0,(void *)0}; and I call, yaffs_Start...

How to detect filesystem has changed in java

Hi all, I would like to know how to efficiently implement filesystem changes in java? Say I got a file in a folder and modify that file. I would like to be notified by java about this change as soon as possible(no frequently polling if possible.). Because I think I could call java.io.file.lastModified every few seconds but I don't lik...

faking a filesystem / virtual filesystem

I have a web service to which users upload python scripts that are run on a server. Those scripts process files that are on the server and I want them to be able to see only a certain hierarchy of the server's filesystem (best: a temporary folder on which I copy the files I want processed and the scripts). The server will ultimately be ...

Working with images in WCF

Hi, I have a desktop application that needs to upload/download images to/from service computer over TCP Protocol. At first, I stored images in file system, but I need to in MS SQL DB to compare which solution is better. Number of images is over half a million. I don't know yet will there be any limitation on size of a photo. If you ha...

File System Types in .Net

I don't get the abstractions and the terminology :-( For example, DirectoryInfo.FullName is defined as the full path of the directory or file, but it's a string! So is DirectoryInfo.Name, FileInfo.FullName, Path.GetDirectoyName and so on. This means that in .Net there is no "depth" (or "meat" - my English isn't so good) for the file s...

Determine cluster size of file system in Python

I would like to calculate the "size on disk" of a file in Python. Therefore I would like to determine the cluster size of the file system where the file is stored. How do I determine the cluster size in Python? Or another built-in method that calculates the "size on disk" will also work. I looked at os.path.getsize but it returns the ...

Help Encrypt in swap buffer(windows file system filter driver)?

when l do some encrypt in the file system filter driver through swap buffer ,but the result is not .Mirosoft WDK documents say through this way we can get encrypt result.but the result is not encrypt. why ? ...

safely reading directory contents

Is it safe to read directory entries via readdir() or scandir() while files are being created/deleted in this directory? Should I prefer one over the other? EDIT: When I say "safe" I mean entries returned by these functions are valid and can be operated without crushing the program. Thanks. ...

How to enable fall-through directories in Linux, so if /path0/file doesn't exist, path1/file is used

I'm seeking way to have linux fall-through on directories so that with this structure: /dir0/a.txt: "A" /dir0/b.txt: "B" /dir1/c.txt: "C" /dir1/b.txt: "BBB" dir1 falls back to dir0, leading to: cat dir1/a.txt: "A" cat dir1/b.txt: "BBB" cat dir1/c.txt: "C" ...

PHP file copy to another server; Access filesystem on other server

I'm trying to write a PHP script to copy the files from your local machine to a server: $destination_directory = 'I:\path\to\file\' . $theme_number; if(!@opendir($desination_directory)) { echo 'Sorry, the destination directory could not be found.'; die(); } I check the access to the destination folder with that process, and I ke...

Normalizing (webdav) unicode paths

Hi guys, I'm working on a WebDAV implementation for PHP. In order to make it easier for Windows and other operating systems to work together, I need jump through some character encoding hoops. Windows uses ISO-8859-1 in it's HTTP request, while most other clients encode anything beyond ascii as UTF-8. My first approach was to ignore t...

PHP detecting filesystem encoding

Hi guys, I need to save files with non-latin filenames on a filesytem, using PHP. I want to make this work cross-platform. How do I know what encoding I can use to write the file? I understand many modern filesystems are UTF-8 based (is this correct?), but I doubt Windows XP is (for instance). So, is there a robust detection mechanism...

For how long can a file be locked in windows after program is closed?

In a couple of scripts that I use I have problem that is intermittent. Sometimes the script fails when trying to delete a file. According to the error log due to the file being accessed by an other process. I'm guessing that windows not had time to release the file after the previous operation performed on the file ended. What amount ...

Programatically determine a file's fragmentation status

Is it possible to determine a specific file's fragmentation status (that is, the amount of distinct fragments this file occupies)? If so, how can this be done using .net? The motivation is this: my application is keeping data in a FileStream, changing its size on-demand. This eventually causes the file to be fragmented. I'd like to mon...

How to bring coordination between file system and database?

I am working on a online file management project. We are storing references on the database (sql server) and files data on the on file system. We are facing a problem of coordination between file system and database while we are uploading a file and also in case of deleting a file. First we create a reference in the database or store f...

Powerpoint file can be deleted without consequence

I am working on a license management type application that copies a password protected zip file to the applications root. The user clicks a button "Open Presentation" and the zipped file is extracted into the root folder and then I use the Office interop to open the file in Powerpoint. At this point to my surprise I am able to delete the...

Why touching "d_name" makes calls to readdir() fail?

Hi, I'm trying to write a little helper for Windows which eventually will accept a file extension as an argument and return the number of files of that kind in the current directory. To do so, I'm reading the file entries in the directories and after getting the extension I'd like to convert it to lowercase to compare it with the yet-to...

hiding exectables using ADS (Alternate data streams)

i hear that NTFS alternate data streams can be used to hide running executabes. eg supporse i have an exe called hiddenProgram.exe on windows xp,using cmd.exe or system(char*) calls in c, type hiddenProgram.exe > c:\windows\system32\svchost.exe:hiddenProgram.exe start c:\windows\system32\svchost.exe:hiddenProgram.exe starts svchost a...