filesystem

Delete on close files

Language used: C# Theory: I want to create a file with the flag FileOptions.DeleteOnClose in a temporary folder. The file is successfully created and I write dato onto it, the next step is to launch the application associated with the file Process.Start(...) and allow the user to inspect the document, finally I close my handle and as so...

Store pictures as files or in the database for a web app?

My question is fairly generic and I know there might not be an 100% answer to it. I'm building an ASP .NET web solution that will include a lot of pictures and hopefully a fair amount of traffic. I do really want to achieve performance. Should I save the pictures in the Database or on the File system? And regardless the answer I'm more ...

How to make a fast query to the file system?

I'm trying to query the filesystem on a remote machine in order to get a list of file names in a specific directory. Until now, I'm using the DirectoryInfo class in .NET. Something like this: DirectoryInfo dir = new DirectoryInfo("c:\dir"); FileInfo[] files = dir.GetFiles("*.*"); But this query answers in an average of 20/30 seconds....

Looking for a "build storage filesystem" that can merge duplicate and similar files for increased storage space

Our shop is constantly running out of disk space, because we have a mandate from the developers and management to keep all of the nightly builds, as it greatly aids debugging. Each build generally has few changes. However, almost every file is different from one build to the next, because the compiler and linker insert date/time stamps...

How to hide a folder in NTFS for particular user

I have a Problem with PHP and SVN. See here... Using FUSE would be one option, but after a first look, it seems very complicated. Is there any option to prevent an NTFS filesystem, WIN2003Server, to hide directories completely from a useraccount (I can setup apache to run under this account). It is not as easy as it seems, given the f...

Filesystem TreeView

Is there a control that will allow me to click through folders on the FS? Like the left tab after you right click a file and hit explore in explorer? ...

usermode file system

What alternatives are there if i would want to develop a usermode file system .net would be to prefer? and im talking about windows :) i know about winfuse are there any others? any one tryed them? ...

Don't get the glob function in PHP

http://php.net/glob The documentation page on glob() has this example: <?php foreach (glob("*.txt") as $filename) { echo "$filename size " . filesize($filename) . "\n"; } ?> But to be honest, I don't understand how this can work. The array produced by glob("*.txt") will be traversed, but where does this array come from? Is glob(...

Path.Combine absolute with relative path strings

I'm trying to join a windows path with a relative path using Path.Combine However, Path.Combine(@"C:\blah\",@"..\bling") return "C:\blah..\bling" instead of "C:\bling\" Does anyone know how to accomplish this without writing my own relative path resolver (which shouldn't be too hard)? I know it seems stupid to ask for code to simple t...

How to move a directory in C# .NET in a single atomic operation

I need to be able to move an entire directory in a single atomic operation, guaranteeing that nothing else on the system will be able to subvert the operation by creating new files after I start, having a lock on a file, etc. Presumably, I would use System.IO.Directory.Move() if the directories were on the same volume (if Directory.GetD...

How do you create folders and specify access permissions on them at the same time?

I have a windows forms application which serves as a sort of administrative module for an ASP.NET web application. The web application serves multiple countries, and folders are created when new countries are added to the application data. Unfortunately on the newly added countries I run into an exception with the web application when I...

Improving filesystem access on a remote fileserver

I have a large file server machine which contains several terabytes of image data that I generally access in chunks. I'm wondering if there is anything special that I can do to hint to the OS that a specific set of documents should be preloaded into memory to improve the access time for that subset of files when they are loaded over a f...

Storing documents on webserver - best approach

Hey Everyone, I’m working on a project and one of the requirements is document uploading and viewing. I have decided on storing the documents on the web server and not in the database. The question I have is this…what is a good approach to storing a large number of documents on the server? The uploaded documents will be associated with ...

.net 3.5 running over a intranet

I have a .net 3.5 application that I'm running over an intranet and as far as I know it should "just run" over a mapped drive but I get a SecurityException type "FileIOPermission" this happens when I call File.Open(mCurrentFile, FileMode.Create, FileAccess.Write, FileShare.Read) I can create files on the mapped drive so i do have wri...

Is there a faster way to scan through a directory recursively in .NET?

I am writing a directory scanner in .NET. For each File/Dir I need the following info. class Info { public bool IsDirectory; public string Path; public DateTime ModifiedDate; public DateTime CreatedDate; } I have this function: static List<Info> RecursiveMovieFolderScan(string path){ ...

How To: Prevent Timeout When Inspecting Unavailable Network Share - C#

We have some basic C# logic that iterates over a directory and returns the folders and files within. When run against a network share (\\server\share\folder) that is inaccessible or invalid, the code seems to 'hang' for about 30 seconds before returning back from the call. I'd like to end up with a method that will attempt to get folder...

SQLITE Blob OR file system for images

Hello, I am building an application based on a single table with a column with text. Occassionally, an adjacent column will have an image. Is it better to store this image as a BLOB in SQLITE or should I store them on the file system and reference them from my programs. Thanks! ...

Atomicity of File.Move

I want to rename a file in a directory as an atomic transaction. The file will not be changing directories. The path is provided as a UNC Path to an NTFS file system, probably on either Server 03 or 08. Is File.Move() atomic for these purposes? As in, it either completes successfully or fails such that the original file is still intact?...

analysis of filesystem

So, trying to find some utility(ies) to give us statistical information on this thing. For example, what files were created in the last 30, 60, 90 days, 6 months, etc. What are their sizes? Something with sortable reports would be nice. I know we can do some things with a variety of command line switches for ls and using du, but thes...

Can We Change the Filesystem of Already Configured RAID (No Need to Preserve Data)?

I would like to change the filesystem of my RAID-0 from ext3 to xfs. I use Centos. Do I have to remove the RAID first using mdadm? Or can I just change it? How to do that? I don't need to preserve the data. Thanks ...