delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/04/15:18:14

Date: Mon, 4 Aug 1997 15:16:48 -0400 (EDT)
From: "Art S. Kagel" <kagel AT ns1 DOT bloomberg DOT com>
To: Joshua Eckstein <kwe1 AT flash DOT net>
Cc: djgpp AT delorie DOT com
Subject: Re: File Paths and Directories
In-Reply-To: <5rllpr$5vc$1@excalibur.flash.net>
Message-Id: <Pine.D-G.3.91.970804151242.11813E-100000@dg1>
Mime-Version: 1.0

On Tue, 29 Jul 1997, Joshua Eckstein wrote:

> I'm trying to find out how to specify a filename as not to be
> drive/directory specific. In other words, if someone puts the executable in
> [xfolder] and I have established a branch directory for data, it will look
> in [xfolder]\data. Like so:
> 
> LoadPic ("\data\example.pic", ...);

Leave off the lead slash or back slash (use slashes for portability
DJGPP does not care) and make that:

  LoadPic ("data/example.pic", ...);  

This is a path relative to the applications current directory.  So if
the user has CD'd to [xfolder] or the program chdir()'s to [xfolder]
this will always work.

Art S. Kagel, kagel AT bloomberg DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019