Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com From: Shankar Unni Subject: Re: Filename limits Date: Thu, 28 Oct 2004 11:23:51 -0700 Lines: 44 Message-ID: References: <418019CC DOT 6070900 AT breame DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT sea DOT gmane DOT org X-Gmane-NNTP-Posting-Host: adsl-68-120-146-125.dsl.snfc21.pacbell.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Thunderbird/0.8 Mnenhy/0.6.0.101 In-Reply-To: <418019CC.6070900@breame.com> X-IsSubscribed: yes Colin JN Breame wrote: > As I understand, relative paths in windows suffer from a 255 character > limit (or something like that). It's not based on relative vs absolute: it's which API you use. I've quoted a bit from the MSDN documentation (Platform SDK: Storage: Naming a file). Not being intimate with the cygwin internals, I'm not sure which of these limits apply, but I suspect the same limits apply as described below.. * Maximum Path Length In the Windows API, the maximum length for a path is MAX_PATH, which is defined as 260 characters. A path is structured as follows: drive letter, colon, backslash, components separated by backslashes, and a null-terminating character. For example, the maximum path on the D drive is D:\<256 chars>NUL. The Unicode versions of several functions permit a maximum path length of 32,767 characters, composed of components up to 255 characters in length. To specify such a path, use the "\\?\" prefix. For example, "\\?\D:\". To specify such a UNC path, use the "\\?\UNC\" prefix. For example, "\\?\UNC\\". Note that these prefixes are not used as part of the path itself. They indicate that the path should be passed to the system with minimal modification. An implication of this is that you cannot use forward slashes to represent path separators or a period to represent the current directory. When using the API to create a directory, the specified path cannot be so long that you could not append an 8.3 file name. Note that the shell and the file system may have different requirements. It may be possible to create a path with the API that the shell UI cannot handle. * Relative Paths For functions that manipulate files, the file names may be relative to the current directory. A file name is relative to the current directory if it does not begin with a disk designator or directory name separator, such as a backslash (\). If the file name begins with a disk designator, it is a full path. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/