filesystem

Handler for file names

When windows is displaying the files through Window Explorer I need to have the ability to change the icon of the file type before it is displayed. I have seen application like SubVersion and Carbonite, change the icons depending on their status, but how do you do this? ...

In-Memory File System for WIndows

I have a command-line executable which I need to run from Java on Windows XP. It uses files as input and output. But I want to avoid the overhead of file IO, so I thought of an in-memory RAM file system. NetBSD has mount_mfs. Could you recommend the most convenient way of doing this? ...

CS0016: Directory invalid error... I solved it but I don't understand the solution

I've been battling for two days tracking down a mysterious error when compiling an ASP.NET website. The error is the (quite famous) CS0016: "Unable to write to output file [filename] - directory is invalid". I have discovered after two days of debugging that the cause of my problem is that the NetworkService somehow does not have the ne...

Visual Studios - Share folders between different projects

I've got two projects, one CF2.0 project and one NET2.0 project. These projects are related to a CF2.0 application project and a NET2.0 WebService project respectively. The projects are my Data Access Layers and they are both identical, apart from the ProtoBuf Dll version. Is there any way that my NET2.0 DAL project can just reference ...

Store images(jpg,gif,png) in filesystem or DB?

Possible Duplicates: Which is more secure: filesystem or database? User images - database vs. filesystem storage store image in database or in a system file ? I can't decide which one I should follow. Can you guys give some opinions? Should I store my images in the file-system or DB? (I would like to prevent others from stea...

File type indicator, sys/stat.h st_mode regular file code value

I am trying to identify file types for directory entries (Windows Unix etc..). In sys/stat.h the high order nybble of the st_mode word have the coded values: #define S_IFDIR 0x4000 /* directory */ #define S_IFIFO 0x1000 /* FIFO special */ #define S_IFCHR 0x2000 /* character special */ #define S_IFBLK 0x3000 /* block special */ ...

"require File.dirname(__FILE__)" -- how to safely undo filesystem dependency?

Some Ruby librararies I'm using use require statements like this: require File.dirname(__FILE__) + '/specification_helper.rb' lib_dir = File.expand_path(File.join(File.dirname(__FILE__), "lib")) require File.join(File.dirname(__FILE__), 'lib/tools', 'version') require File.expand_path(File.join(File.dirname(__FILE__), 'datautils', 'c...

How to find out what processes have folder or file locked?

How do you go about querying running processes to find out what folders or files they have locked? (i.e. you go to eject a drive and you're told that it can't be ejected because it's in use) I'd like to either get an "off the shelf" download, or write a .NET 3.5 app to do this (primarily a Windows question). ...

Absolute path of executable start directory

Hi, I am trying to figure out how to grab the start directory for my program. I am using C and have access to GLib. On the Linux side it is easy, g_get_current_directory as soon as the program is launched, and store this value for later use. I tried using the same method on windows but g_get_current_directory returns whatever %APPDATA% ...

Classic file system problem - concurrent remote processing on a directory

I have an application that processes files in a directory and moves them to another directory along with the processed output. Nothing special about that. An interesting requirement was introduced: Implement fault tolerance and processing throughput by allowing multiple remote instances to work on the same file store. Additional...

Adding pages "on the fly" with a CMS system

Hi, I am in the process of building a website content management system for one of my clients. It's a highly customized system, so I cannot use any "of the shelve" solution. I need to allow my client to add pages to the website on the fly. I have two options here: (1) Create a database driven page in the format of www.mycompany.com/pa...

Java NIO framework for filesystems instead of networks?

There are several high quality frameworks that hide the complexity of NIO based network programming (mina, netty, grizzly, etc.). Are there similar frameworks that simplify NIO based file-system programming? For example, as a learning exercise, I would like to implement a disk backed Map based on this (awesome!) article: http://www.jav...

How to prevent illegal file and folder name creation in Windows Server 2003 or Windows Server 2008

Preventing illegal file and Folder name creation on a Windows 2003/2008 file server is the goal. We know from articles like http://stackoverflow.com/questions/62771/how-check-if-given-string-is-legal-allowed-file-name-under-windows that for some reason the file system allows creation of illegal file/folder chacters and paths that exceed ...

How to debug filesystem "access denied" errors on win32?

Hi all I'm having a hell of a time with our build scripts right now: I'm using Waf to drive our build process, and everything works great, except on Windows, where I am getting intermitent errors during builds. The errors are always basically "access denied" errors of one form or another, relating to temporary files I have created duri...

Best practice for recording page hits using PHP?

I want to record number of hits to the pages and I'm thinking either plain file-based or SQLite storage. File-based option A file includes only an integer incremented with each page visit and every page has a unique file name. If I open a file using a mode, I can write but is it possible to not to close it in order to save from opening ...

How to determine who changed a file?

In Windows, how can I programmatically determine which user account last changed or deleted a file? I know that setting up object access auditing may be an option, but if I use that I then have the problem of trying to match up audit log entries to specific files... sounds complex and messy! I can't think of any other way, so does anyon...

Why is the user.dir system property working in Java?

Almost every article I read told me that you can't have chdir in Java. The accepted answer to this question says you can't do it in Java. However, here's some of the stuff I tried : geo@codebox:~$ java -version java version "1.6.0_14" Java(TM) SE Runtime Environment (build 1.6.0_14-b08) Java HotSpot(TM) Client VM (build 14.0-b16, mixe...

Retrieving paths of FileSystemInfo instances

How does one retrieve ( or resolve, for that matter ) the absolute and relative ( FullPath and OriginalPath fields ) paths of FileSystemInfo/DirectoyInfo/FileInfo instances ? I'm trying to get the paths of the files/directories returned by a FileSystemInfos call on a DirectoryInfo class object. ...

PHP - Convert File system path to URL

I often find that I have files in my projects that need to be accessed from the file system as well as the users browser. One example is uploading photos. I need access to the files on the file system so that I can use GD to alter the images or move them around. But my users also need to be able to access the files from a URL like "site....

How to move multi files using SHFILEOPSTRUCT?

How to move multi files using SHFILEOPSTRUCT? vector<CString> srcPaths; vector<CString> dstPaths; SHFILEOPSTRUCT FileOp;//定义SHFILEOPSTRUCT结构对象; int fromBufLength = MAX_PATH * imageVec.size() + 10; TCHAR *FromBuf = new TCHAR[fromBufLength]; TCHAR *ToBuf = new TCHAR[fromBufLength]; shared_array<TCHAR> arrayP...