---

LinuxProgramming.com: SourceLib: New Code Samples Are Available

Two new code samples have been added to SourceLib:

Name: dir_sweep
Category: File_Handling

Purpose: Demonstrate how to sweep through a
directory structure, using a recursive function that uses two
callback functions which allow the calling routine a considerable
amount of control over terminating the run, as well as the ability
to collect information about the directories and files found in the
sweep.
Keywords: C stat.h dirent.h unistd.h dirent stat
getcwd chdir opendir readdir closedir directory sweep

Name: detecting_redirection
Category: Basics
Purpose: Demonstrate how to detect whether stdin,
stdout, and stderr have been redirected.
Keywords: C unistd.h isatty stdin stdout stderr
detecting redirection

If you’d like to learn more about SourceLib or contribute to it,
see the following resources:

The original
announcement and overview


Submission guidelines

Suggested
topics list

If you’d like to send us some suggestions or comments about
SourceLib (or anything else on LinuxProgramming.com, for that
matter), please feel free to e-mail me directly at the address
below.

Take care,
Lou Grinzo
Editor, LinuxProgramming.com
lgrinzo@internet.com

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis