filesystem

How can I create a file with invalid Windows timestamps?

I'd like to create a file with an invalid created/modified/accessed timestamp to use in unit tests to ensure that my application can handle files with invalid timestamps. It's a Windows application written in C# that could run on both NTFS and FAT32 filesystems. ...

LRU file cache and the cost of finding a file in a Windows directory

I have an application that will download and cache, at a minimum, 250,000 8KB* files totaling about 2GB. I need to remove the least recently used file when updating this cache. *These tiny files span two 4KB sectors. What is the relative cost of obtaining a file handle by name for this type of file in a directory on an NTFS-formatted 5...

Delete a corrupt file in linux

Hello!, how i can delete this file?, i think that is a corrupt file ina vfat filesystem. -????????? ? ? ? ? ? 100.jpg Thanks ...

Access files in "private Documents" folder transferred with iTunes

Hi, currently i'm trying to access the files that are transferred using the new ios feature introduced with 3.2. - (NSString *)getPrivateDocsDir { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; documentsDirectory = [do...

boost::filesystem relative path and current directory?

Hi, How can I use boost::filesystem::path to specify a relative path on Windows? This attempt fails: boost:filesystem::path full_path("../asset/toolbox"); // invalid path or directory. maybe to help me debug, how to get the current working directory with boost::filesystem? Thanks. ...

HTML5 offline storage. File storage?

For storing data offline WebApp can use: session storage, "advanced version of cookies" key/value based Web Storage (AKA local/global/offline/DOM storage) sql-based Web SQL Database and Indexed Database API FileReader and FileWriter API (requires user to select files each time the application loads) But apparently there is no File St...

How to download a file to server PHP?

Is it possible with PHP script to have the script download a file on a remote server to my web server? I have my own webserver and domain. I want to put a php script on that domain, that will download a file from a remote server onto my server's filesystem. Is this possible? -Jim ...

In C# Using Directory.GetFiles(), is there a way to start threads as files are found instead of having to wait?

In C# Using Directory.GetFiles(), is there a way to start threads as files are found? The behavior appears to be 'find all the files' then do what you need on each. Is there another class that allows one to start threads (up to a certain count) as files are found? ...

Get the path "difference" between two directories

The situation: I got one or more absolute paths, e.g.: /home/benjamin/test/ /home/benjamin/test/a/1 /home/benjamin/test/b/1 How can I get the difference between two paths? Let's say I want to know how I can get from path 1 to path 2. Expected result would be /home/benjamin/test/a/1 - /home/benjamin/test/ = /a/1 Is there a more ele...

Sparse Files and Disk Quotas

Suppose, My D: volume capacity is 100GB. And I'm using it 80GB now. The remain is only 20G. Now, I try to make a sparse file. DWORD written; std::wstring s = L"D:\\sparse9.test"; HANDLE h = CreateFileW(s.c_str(), GENERIC_WRITE, FILE_SHARE_DELETE, 0, CREATE_NEW, 0, 0); if(!DeviceIoControl( h, FSC...

How slow is gzuncompress?

I'm working with a very simple filesystem database in order to benefit from performance. Unfortunately, the trade-off is disk space. I'm thinking about compressing data everytime I write and read from the filesystem database using gzuncompress and gzcompress. How slow are those functions? Can they be used without affecting my system perf...

Special Character in windows file name.

why we can not use any special character (?, <..) in windows File name ? ...

Does cygwin understand NTFS junction points?

Does cygwin (1.7.x) understand Windows NTFS junction points (as created by mklink in Win7/2008 or sysinternals' junction.exe)? How do they differ from a symbolic link as created by "ln -s "? ...

Linux mount points

I have a linux device (proprietary embedded device) that has the following mount points (when I type "mount") for two key directories. /dev/sda1 on /home/user/Personal type ufsd (rw,nls=utf8,uid=60,gid=144,fmask=0,dmask=0,force) /dev/sda1 on /home/user/Backup type ufsd (rw,nls=utf8,uid=60,gid=144,fmask=0,dmask=0,force) I want to creat...