Read-only access to FAT32/NTFS files w/ write locks?

M

Matt

Hello,

In my application that I'm writing in C++ (and maybe Java),
specifically the cygwin flavor of C++, I want to be able to open any
existing files in FAT32 or NTFS file systems (in Windows XP) for
read-only purposes. In particular, I want my program to
unconditionally be able to read-only open any file--and be able to
read all the contents from said fail--which has been marked with any
sort of "exclusionary" lock, including write locks or any other kind
of locks.

Is this possible? Are there any "exclusionary" locks or scenarios
where in WinXP (with either FAT32 or NTFS files) that might prevent
another process from opening a file in read-only mode?

The only case I have experience: using cygwin to unset all file
permissions (including the "read" bit(s)) in an NTFS file system, in
which case non-Administrator processes (presumably) will not be able
to read the file.

Thanks for any help,
-Matt
 
K

Kristo

Matt wrote:
[a Windows-specific question]

This is off-topic for clc++. Followups set.

Kristo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top