From owner-freebsd-questions@FreeBSD.ORG Tue Feb 1 21:05:07 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3355816A4D4 for ; Tue, 1 Feb 2005 21:05:07 +0000 (GMT) Received: from out005.verizon.net (out005pub.verizon.net [206.46.170.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC05843D55 for ; Tue, 1 Feb 2005 21:05:06 +0000 (GMT) (envelope-from reso3w83@verizon.net) Received: from ringworm.mechee.com ([4.26.84.7]) by out005.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20050201210450.CQXS1013.out005.verizon.net@ringworm.mechee.com>; Tue, 1 Feb 2005 15:04:50 -0600 Received: by ringworm.mechee.com (Postfix, from userid 1001) id 827A52CE8BD; Tue, 1 Feb 2005 12:59:03 -0800 (PST) From: "Michael C. Shultz" To: FreeBSD Questions Date: Tue, 1 Feb 2005 12:58:59 -0800 User-Agent: KMail/1.7.1 References: <20050201193507.GD71726@keyslapper.net> In-Reply-To: <20050201193507.GD71726@keyslapper.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200502011258.59704.reso3w83@verizon.net> X-Authentication-Info: Submitted using SMTP AUTH at out005.verizon.net from [4.26.84.7] at Tue, 1 Feb 2005 15:04:06 -0600 cc: Louis LeBlanc Subject: Re: library call for directory path creation? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Feb 2005 21:05:07 -0000 On Tuesday 01 February 2005 11:35 am, Louis LeBlanc wrote: > I know there might be a better place for this question, but here > goes. > > I'm working on a utility that has to, among many other things, create > directory paths, often with a series of parent directories that may > not already exist. Solaris has mkdirp(3GEN) in the libgen library, > but I can't find a library call that will do this in FreeBSD. Kind > of like `mkdir -p` would. > > I know it would be pretty trivial to roll my own, and if I can't find > it I will. I'm just curious if anyone knows of an *existing* library > call that would do this. > > TIA > Lou Assuming your working in C what is wrong with: char command[] = "mkdir -p /path/to/whatever"; system( command ); ?? -Mike