Path: utzoo!censor!geac!torsqnt!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!unido!laura!klute@heike.informatik.uni-dortmund.de From: klute@heike.informatik.uni-dortmund.de (Rainer Klute) Newsgroups: comp.sys.atari.st Subject: Folder hierarchy and pathname length Message-ID: <2018@laura.UUCP> Date: 26 Feb 90 08:31:12 GMT References: <2051@atari.UUCP> Sender: news@laura.UUCP Reply-To: klute@heike.informatik.uni-dortmund.de (Rainer Klute) Organization: University of Dortmund, W-Germany Lines: 34 In article <2051@atari.UUCP> apratt@atari.UUCP (Allan Pratt) writes: >Most people don't open a file 40 directories down in >their heirarchy, or two folders each 20 (different) levels down, or >whatever. Hmm, is that really possible? I once tried out how deep a file could be nested in the file system hierarchy. From the desktop I created a folder "1" in the root directory, then a folder "2" within "1" and so on. I ended with folder "8" and got a message which told me that it is not possible to create a folder so deep in the index structure. To open a file 20 or 40 levels deep in the file system should not be possible. Now you can calculate the maximum pathname length: 3 (drive id, colon, backslash) + 8 (max. folder nesting) * (8+1+3+1) (basename (folder), dot, extension, backslash) + (8+1+3) (basename (file), dot, extension) + 1 (string terminating null character) = 120. Many (most?) programs do not care for pathnames of that length. For example I got 1st Word Plus to bomb out when I tried to open a file "D:\11111111.111\...\88888888.888\TEST.DOC". Probably the internal pathname buffer is to small and longer names overwrite other data. My Laser C documentation says that a 64 byte buffer for the dirname portion of a pathname is sufficient. However, I do not know what the official Atari developer's documentation says. Any comments? Dipl.-Inform. Rainer Klute klute@heike.informatik.uni-dortmund.de Univ. Dortmund, IRB klute@unido.uucp, klute@unido.bitnet Postfach 500500 |)|/ ...uunet!mcvax!unido!klute D-4600 Dortmund 50 |\|\ Tel.: +49 231 755-4663