filesystems

Compare contents of 2 folders and remove files with the same name that are present in both folders

I am currently writing a quick script in Ruby that goes through all the contents of two folders, and returns a list of all the files that are not in either of the two folders. Currently what I am doing is storing the paths of all the files of each directory in an array: Find.find(dir1) do |path| if File.file?(path) directory1_file...

When do we should use a scatter/gather(vectored) IO?

Windows file system supports scatter/gather IO.(Of course, other platform does) But I don't know when do I use the IO mechanism. Could you explain me a proper case? And what benefit can we get from using the I/O mechanism?(Just a little IO request?) ...

Confict between UTF-8 normalized-forms of encoding for accents

Hello, I've got a bug with UTF-8 normalizations: as far as I understood, there's (at least) two ways to write an 'é' in UTF-8 : CC 81 and C3 A9. [After a migration from Mac/OSX to a PC/Linux] I now have a conflict between the paths I store in my database and the actual file system structure, which prevents me from accessing correctly...

Windows equivalent to Linux namespaces (per-process filesystem mounts)?

Linux has a feature called namespaces, which let you give a different "view" of the filesystem to different processes. In Windows terms, this would be useful for example if you had a legacy program "floyd" that always loaded its configuration from C:\floyd\floyd.ini. If Windows had namespaces, you could write a wrapper script which wou...

How to merge efficiently gigantic files with C#

I have over 125 TSV files of ~100Mb each that I want to merge. The merge operation is allowed destroy the 125 files, but not the data. What matter is that a the end, I end up with a big file of the content of all the files one after the other (no specific order). Is there an efficient way to do that? I was wondering if Windows provides...

Light Weight File System

I am trying to develop my own version of ubuntu to use in a real time system that will display parameters of your vehicle. Capabilities of the system, no media, logging of vehicle metric will take place, script that update application and interface files from flash drive and main application. Would a lightweight file system free up res...

Is there a location for custom Ruby libraries to be stored so Ruby can find them?

I have written a module that has some generic, reusable code that I would like to be able to use in other projects. Is there a place I could put this file on computer so that Ruby can find it regardless of where I saved the file that is including it? I am using a Mac. ...

How to organize and manipulate pictures in filesystem?

Although it may not seem like that but there is a little questions about this subject. I am not asking if I should use DB or filesystem, the file system it is, but I am asking what is the best way of organizing pictures in file system that will be used with asp.net application? I am talking about tens or even hundreds of thousands of pic...

How to create / access a shared folder in a linux system?

Hi, We are setting up two server systems. One of which will host a 3rd party application which will by default save certain data on a local folder: /opt/application/common/recordings How do I create a "writable share" on the other server (with appropriate permissions), so that all these files from the first server are saved on the...

How should I organize my xCode project files?

I'm trying to wrap my head around xCode's file organization - or lack there of. I can do all I wan in project and it looks great with all the "fake" folders and structure. I go look at the file system and boom HUGE mess. I've tried importing files with the Create Folder Reference for any added folder option checked and that works, kinda....

Attaching arbitrary data to DirectoryInfo/FileInfo?

I have a site which is akin to SVN, but without the version control.. Users can upload and download to Projects, where each Project has a directory (with subdirs and files) on the server. What i'd like to do is attach further information to files, like who uploaded it, how many times its been downloaded, and so on. Is there a way to do t...

Does it make sense to use `java.nio.file.spi`to implement access to a remote file system?

Basically I write an application which copies/moves files from the local file system to a remote file system over some FTP-like protocol. Would it be a good approach to encapsulate the protocol-specific bits inside of the file system service provider interface? As far as I understand that would make my library work with other applicati...

Is there a way to directly query the file system device driver for listing out the files in a directory ?

Hi, I'm currently using FindFirstFile, FindNextFile API to recursively iterate through directories for searching files based on a given criteria. I noticed that "dir /s" command gives better performance than my program. I'm tried checking out the events in process monitor and it looks like cmd.exe/dir command is directly querying the di...

local file system access via HTML5 and PHP5

I want to enhance my browser-based web application with functionality that needs to read the absolute path of the files being uploaded and used for some processing, I have used HTML5 File API and PHP POST Upload method to support the upload functionality. Question: Direct or work around method of reading the absolute path (client-side) ...

dropbox equivalent for my webiste?

I'd like to add dropbox-like functionality to my website... What are the open source or commercial projects I could look at to get started? Thanks, -Eroc ...

Script to open newest image (latest timestamp) in XP?

Hello- I need some type of script or command that when triggered, opens up the most recent timestamped .jpg file within a specific folder ex: c:\images I will use autohotkey to call the script/command (AHK may even be able to execute for all I know) at specific intervals. Any help appreciated. Thanks! ...

Checking for file existence in C++

Currently I use something like: #include <sys/stat.h> #include "My_Class.h" void My_Class::my_function(void) { std::ofstream my_file; struct stat file_info; if ( filename_str.compare("")!=0 && stat(filename_str.c_str(),&file_info) == 0 ) { my_file.open(filename_str.data(),std::ios::trunc); //do stuff my_...

Try-Catch Block For C++ File-IO Errors Not Working

I'm very new to the world of C++ error handling, but I was told here: http://stackoverflow.com/questions/3622030/checking-for-file-existence-in-c ...that the best way to checks for file existence was with a try-catch block. From my limited knowledge on the topic, this sounds like sound advice. I located this snippet of code: http://ww...

git status shows modified after files copied

Hi, When I copy files from my Linux machine to my external HDD (FAT format), 'git status' shows that files are modified. I guess that occurs because of the file system difference. I formatted the external HDD with FAT to share it with my Mac, Windows, and Linux. How can I solve this problem? Thanks. Sam ...

Which file systems support splicing via Linux's splice(2)?

The man page for the splice system call says that splice may fail and set errno to EINVAL if: Target file system doesn't support splicing; neither of the descriptors refers to a pipe; or offset given for non-seekable device Which file systems support splicing? ...