From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1JhnVD-0004p2-3i for garchives@archives.gentoo.org; Fri, 04 Apr 2008 15:06:51 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 89065E07A0; Fri, 4 Apr 2008 15:06:49 +0000 (UTC) Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.190]) by pigeon.gentoo.org (Postfix) with ESMTP id 27562E07A0 for ; Fri, 4 Apr 2008 15:06:49 +0000 (UTC) Received: by gv-out-0910.google.com with SMTP id n40so44021gve.39 for ; Fri, 04 Apr 2008 08:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=oMo/2rpkBQdJMA7shnO90SdYj9fSlw0MabZXgx0E8g8=; b=O9uugd6clv+EoYKAkCTuFp3/ztC2PHKgAKcCX+KVz8zQRY4aML5hGwBiUHuo0cEZRIsvbXG2qSOgqPJgLtIJcVFp2sflMvbsDEf0wiod7NnHnCUsTuBoQGPJQ6kopo3awYtVus0+En/OTM5pSyCUuomN+8+MIRkmRntgLzj+mFw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=C07fJBmmrBW7PZlGZL/+do1MFFmbSW4GSSb0dXStFBxKKXqIAXDJEvc1JueYVm++HfJnfQVuOWg+XCTewCsxjVM8ex/voToCWOIcVjNQMCLinWrvOPuTh4Z5VIJDffD0hJ1eUzdur1oum2kTvPKQ4drHw3v7/ZtEloSfi8mEyn0= Received: by 10.114.202.15 with SMTP id z15mr2125322waf.72.1207321606186; Fri, 04 Apr 2008 08:06:46 -0700 (PDT) Received: by 10.114.130.17 with HTTP; Fri, 4 Apr 2008 08:06:46 -0700 (PDT) Message-ID: <60a795cd0804040806l7f92d2xd124a103cdfa5cd0@mail.gmail.com> Date: Fri, 4 Apr 2008 12:06:46 -0300 From: Ale To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] [OT] mkdir in a C program? In-Reply-To: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8871_29655931.1207321606181" References: X-Archives-Salt: 58863667-551d-4ba6-9527-67953552516e X-Archives-Hash: 5f4ac25e1a322031ffe8504edfd49462 ------=_Part_8871_29655931.1207321606181 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 2008/4/4, Denis : > > Does anyone know if a directory can be created from inside a C program > and how that is done? Suppose I run the code from my own directory > /home/mydir, and I want the code to create a directory > /home/mydir/mydata, where data is to be written, what would the format > for such a command be? Also, when you write files to > /home/mydir/mydata, do i put in something like "./mydata/filename" as > the filename to open/write? > > Many thanks! > Denis Take a look on system function, for example system("mkdir /home/mydir"); Cheers! -- > gentoo-user@lists.gentoo.org mailing list > > ------=_Part_8871_29655931.1207321606181 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

2008/4/4, Denis <denis.che@gmail.com>:
Does anyone know if a directory can be created from inside a C program
and how that is done?  Suppose I run the code from my own directory
/home/mydir, and I want the code to create a directory
/home/mydir/mydata, where data is to be written, what would the format
for such a command be?  Also, when you write files to
/home/mydir/mydata, do i put in something like "./mydata/filename" as
the filename to open/write?

Many thanks!
Denis

Take a look on system function, for example system("mkdir /home/mydir");

Cheers!

--
gentoo-user@lists.gentoo.org mailing list


------=_Part_8871_29655931.1207321606181-- -- gentoo-user@lists.gentoo.org mailing list