filesystem

Cross-platform way of constructing an FS path with Qt

Hello, Short story: does Qt 4 have an analog of Python's os.path.join? Long story: I need to add a relative path to the application directory, QCoreApplication::applicationDirPath() in the Right Way (TM), so that the code doesn't depend on the file system directory separator character. Is merely joining QStrings and using "/" as the s...

how to read I-node bitmap of a minix fs bit by bit in c

Hi, I wanted to know how can I read and check(1 or 0) the bits of the the I-node bit map of a minix fs bit by bit in c programming language. This way I want check the free and occupied I-nodes. And also if possible to set and unset the bits manually. Please help. Thank you this is the layout of the minix file system ----------------...

What information is contained in the NTFS metadata?

I want to know what information is contained in the NTFS metadata. But I couldn't find the paper anywhere. I guess the metadata has a filename, a size and an attributes etc. Has NTFS metadata also got a Shortpath name? What information is contained in the NTFS metadata? Do you know a good site or a page about this? If you do, please le...

directory inode

I know that in inodes that represent files, the name it's not in the inode struct. All files are identified in the UFS by its inode-number. I know how it works an inode struct in a file... it has all the info plus some pointers to HD blocks that contains the file data. But I don't know much about how directories are represented as inod...

How can I make OS X recognize drive letters?

I know. Heresy. But I'm in a bind. I have a lot of config files that use absolute path names, which creates an incompatibility between OS X and Windows. If I can get OS X (which I'm betting is the more flexible of the two) to recognize "Q:/foo/bar/bim.properties" as a valid absolute file name, it'll save me days of work spelunking th...

How to fsync or fdatasync in PHP?

PHP lacks any specific function to fsync on a file AFAIK. I do however feel the urge to fsync a logfile I am appending to from PHP. Is there any native PHP function known to cause an fsync? Or any workaround? ...

Where is the journal on the Extended file system?

Where exactly is the journal on the EXT3/EXT4 file system, ive searched around and cant find a good answer. ...

finding out absolute path to a file from python

if I have a file test.py that resides in some directory, how can I find out from test.py what directory it is in? os.path.curdir will give the current directory but not the directory where the file lives. If I invoke test.py from some directory "foo", os.curdir will return foo but not the path of test.py. thanks. ...

Fast way to find the number of files in one directory on Linux

I am looking for a fast way to find the number of files in a directory on Linux. Any solution that takes linear time in the number of files in the directory is NOT acceptable (e.g. "ls | wc -l" and similar things) because it would take a prohibitively long amount of time (there are tens or maybe hundreds of millions of files in the dire...

How to safely remove a USB drive on Windows CE 5.0?

Until today, I assumed that Windows CE was writing everything to disk and I wouldn't end up with a broken FAT16 when I removed the USB stick. Today, I was proven wrong. I use a USB stick to test things on a WinCE 5.0 device. I don't write anything from the app or WinCE to the stick. I just execute my app, and my app reads its settings a...

How can I use SD card for data logging 16bit data at 48ksps

Background My board incorporated an STM32 microcontroller with an SD/MMC card on SPI and samples analogue data at 48ksps. I am using the Keil Real-time Library RTX kernel, and ELM FatFs I have a high priority task that captures analogue data via DMA in blocks of 40 samples (40 x 16bit); the data is passed via a queue of length 128 (wh...

How to find references to the file system in a flash application?

Hello everybody, I need to disable all the aspects of functionality which access the client file system in a flash/flex application. I started having a look on how to do this. It appears that the package flash.filesystem need to be importated to allow the interaction with the file system. However, I did not find any reference to this p...

Tips on improving performance of fuse based file system

I am comparing fusepy , Java based NFS server and native. I see that native file system is 4 times faster and surprisingly Java based NFS server is twice faster compared fusepy based loopback system. Any tips to improve the performance of file systems written based on fusepy or fuse-python. I am running them on linux kernel 2.6.9 and fus...

How does one define PATH_MAX for a given filesystem?

I'm presently writing a filesystem. The statvfs (and even the statfs) structs contain a field specifying the maximum length of a name in that path. As PATH_MAX is defined in the pathconf manpage (getconf), this means it is defined on a per-directory basis (and thus, determined by the underlying filesystem). How does one specify this valu...

How can I tell if a file is a descendant of a given directory?

On the surface, this is pretty simple, and I could implement it myself easily. Just successively call dirname() to go up each level in the file's path and check each one to see if it's the directory we're checking for. But symlinks throw the whole thing into chaos. Any directory along the path of either the file or directory being che...

Listing available files and directories in Matlab

I would like to list available directories and text files in specific directories recursively in Matlab command window (and ultimately in an m-file). I know commands like ls are available, but I would like to know the text files available in a string or vector before I recursively read each text file in the following file system structur...

[Ruby] WebGUI and administrative Systemtasks - best practice?

Hi, I have written a backend for creating ftp-users for proftpd via MySQL-module. After deleting a user from database some OS-specific tasks are left: deleting or moving the files of the user on file system level ("rm -R /home/dir/of/deleted/user"). The backend runs under linux user A, the ftp root belongs to user B. Therefore and for ...

How can I find out who created a file in Windows using .NET?

I need to find out who created a file using .NET I have already tried the following: string FileLocation = @"C:\test.txt"; FileInfo droppedFile = new FileInfo(FileLocation); FileSecurity fileSecurity = droppedFile.GetAccessControl(); IdentityReference identityReference = fileSecurity.GetOwner(typeof(NTAccount)); string userName = ident...

Does anyone know how windows file system works and where I can search more informations?

I am working in a project that uses a filesystem and I'm having some problems integrating with windows. I need help to understand how windows file system works. (sorry, I don't speak english very well) ...

Check if directory path ends with DIRECTORY_SEPARATOR

In PHP I'm receiving a string from the user for a local file directory $path I want to know if they've included the trailing slash (/) or not. I would like this to be cross platform so I'd like to use the PHP constant DIRECTORY_SEPARATOR My failed attempts include trying to do a preg_match like preg_match("/" . DIRECTORY_SEPARATOR . ...