LinuxProgramming.com: SourceLib: New Code Samples Are Available | Linux Today

LinuxProgramming.com: SourceLib: New Code Samples Are Available

Written By
Web Webster
Web Webster
Jan 29, 2001

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

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.