www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/28/19:52:30

From: Thomas Demmer <demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How coould I know if two files are the same?
Date: Thu, 28 Aug 1997 14:47:14 +0200
Organization: Lehrstuhl fuer Stroemungsmechanik
Lines: 40
Message-ID: <34057352.7A91C0F0@LSTM.Ruhr-UNI-Bochum.De>
References: <01IMY1B3EI4I00G6WZ AT cc DOT uab DOT es>
NNTP-Posting-Host: c64.lstm.ruhr-uni-bochum.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

IBEC23 AT cc DOT uab DOT es wrote:
> When a network disk drive X:\ is the same as M:\FOLDER,
> my program "believes" that
>   X:\FILENAME.TXT
> is different from
>   M:\FOLDER\FILENAME.TXT
> but it is the same file.
> 
> (X: and M: are two units mapped on some other computer
> on my local net, but they are really in the same physical
> hard disk. 
[...]
> Xavier Pons

Under any decent OS you'd simply stat() the files and
compare inodes, under DOS and its PTFs this is one of the most
intreaguing and challenging problems. Give your
masochistic side a chance and look at stat.c to see
to which pains it goes to find out if something is local or
on a networked drive. 

For your particular setup, truename() ( _truename() ?)  
might be a solution, because WfW mapped drives and
NetWare drives (when using VLM) are converted into
\\server\path\file, regardless of mapping (Maybe with a 
bit of \ => / or vice versa, to make things not too easy).
-- 
Ciao
Tom

*************************************************************
* Thomas Demmer                                             *
* Lehrstuhl fuer Stroemungsmechanik                         *
* Ruhr-Uni-Bochum                                           *
* Universitaetsstr. 150                                     *
* D-44780  Bochum                                           *
* Tel: +49 234 700 6434                                     *
* Fax: +49 234 709 4162                                     *
* http://www.lstm.ruhr-uni-bochum.de/~demmer                *
*************************************************************

- Raw text -


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