Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

explain_opendir_or_die(3) [debian man page]

explain_opendir_or_die(3)				     Library Functions Manual					 explain_opendir_or_die(3)

NAME
explain_opendir_or_die - open a directory and report errors SYNOPSIS
#include <libexplain/opendir.h> DIR *explain_opendir_or_die(const char *pathname); DESCRIPTION
The explain_opendir_or_die function is used to call the opendir(3) system call. On failure an explanation will be printed to stderr, obtained from explain_opendir(3), and then the process terminates by calling exit(EXIT_FAILURE). This function is intended to be used in a fashion similar to the following example: DIR *dir = explain_opendir_or_die(pathname); pathname The pathname, exactly as to be passed to the opendir(3) system call. Returns: On success, a pointer to the directory stream. On failure, prints an explanation and exits, does not return. SEE ALSO
opendir(3) open a directory explain_opendir(3) explain opendir(3) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_opendir_or_die(3)

Check Out this Related Man Page

explain_mkdir_or_die(3) 				     Library Functions Manual					   explain_mkdir_or_die(3)

NAME
explain_mkdir_or_die - create a directory and report errors SYNOPSIS
#include <libexplain/mkdir.h> void explain_mkdir_or_die(const char *pathname); DESCRIPTION
The explain_mkdir_or_die function is used to call the mkdir(2) system call. On failure an explanation will be printed to stderr, obtained from explain_mkdir(3), and then the process terminates by calling exit(EXIT_FAILURE). This function is intended to be used in a fashion similar to the following example: explain_mkdir_or_die(pathname); pathname The pathname, exactly as to be passed to the mkdir(2) system call. Returns: This function only returns on success. On failure, prints an explanation and exits. SEE ALSO
mkdir(2) create a directory explain_mkdir(3) explain mkdir(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_mkdir_or_die(3)
Man Page

4 More Discussions You Might Find Interesting

1. Programming

about convertions

hi i got in this way DIR *dd; dd = opendir("/root/ramesh/"); ..... then now i have problem how can i convert a string to hexadecimals ex: ram/es:h show me the way thank you for your feedback ramesh (4 Replies)
Discussion started by: ramesh.jella
4 Replies

2. Programming

opendir() + customly created directories

Gday all In a program I am designing, I am using opendir() to test whether entries under a certain directory are sub-directories or not. This method works fine for the directory itself (.) and the parent directory (..), however it does not work for any sub-directories I manually create. i.e.... (5 Replies)
Discussion started by: JamesGoh
5 Replies

3. UNIX for Dummies Questions & Answers

Unix directory system calls question

I'm currently studying for my exam, and is practicing with sample exam questions. However there is a question asking "Name THREE UNIX Directory system calls" and the answer given is "opendir, closedir and readdir", however the next question ask "Why is a write directory system call not included... (1 Reply)
Discussion started by: Izzy123
1 Replies

4. Programming

How to open DIR (with nisted DIR) using C?

by c code if I want to open directory that is come after name of excuted file for example: ./open dir1 it go to dir1 and open it and read every thing insde it...... ... and other problem is how I should read every directory inside that directory and open it to read it and so on? (4 Replies)
Discussion started by: fwrlfo
4 Replies