473,382 Members | 1,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How to get file descriptor permissions?

Hi,
I have a file descriptor of an open file and I would like to know
through C/C++ API how to query its read/write/exec permissions.
Thanks.

Jul 23 '05 #1
2 2432
"Mike" <lu******@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I have a file descriptor of an open file and I would like to know
through C/C++ API how to query its read/write/exec permissions.


File permissions are out of the scope of the C++ standard.
You need to use platform-specific APIs to access these
(and this is OT in this forum).
Ivan
--
http://ivan.vecerina.com/contact/?subject=NG_POST <- email contact form


Jul 23 '05 #2
Mike wrote:
Hi,
I have a file descriptor of an open file and I would like to know
through C/C++ API how to query its read/write/exec permissions.
Thanks.


But to answer your question: Look up chapter "14.9 File Attributes" in
your glibc-documentation. It explains everything.

--
Matthias Kaeppler
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: pembed2003 | last post by:
Hi all, Given something like: std::ofstream out_file("path"); how do I extract the file descriptor from out_file? Is it possible? What I want is to extract the file descriptor and then pass...
5
by: Alvaro Puente | last post by:
Hi all! I've got a FILE* pointing to an already opened file. I want to create a new file in the same directory where that file is. Is there any way of obtaining file path from FILE*? Many...
5
by: Pete | last post by:
I having a problem reading all characters from a file. What I'm trying to do is open a file with "for now" a 32bit hex value 0x8FB4902F which I want to && with a mask 0xFF000000 then >> right...
9
by: Ben Dewey | last post by:
Project: ---------------------------- I am creating a HTTPS File Transfer App using ASP.NET and C#. I am utilizing ActiveDirectory and windows security to manage the permissions. Why reinvent...
2
by: John Regan | last post by:
Hello All I am trying to find the owner of a file or folder on our network (Windows 2000 Server) using VB.Net and/or API. so I can search for Folders that don't follow our company's specified...
6
by: Divick | last post by:
Is there a way in C++ to have a file stream which is directly mapped to memory(virtual memory) without actually having to create a file and then memory mapping that file using system dependent...
5
by: Grant Edwards | last post by:
When one open()s a file (that doesn't exist) for writing , how does one control that file's permissions (it's "mode" in Unix terms). -- Grant Edwards grante Yow! ...
22
by: Dale Pennington | last post by:
I find myself in the odd situation of trying to determine the name of a file that has been opened somewhere else with an fopen call, so all I have is the FILE * from that fopen call. I perused my...
9
by: Bill David | last post by:
I know it's very strange to do that since we have the file name when we call: int open(const char *pathname, int oflag,...); And we can store the file name for later usage. But I just wonder if...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.