---
name: "Ns_PathIsAbsolute"
section: "3"
platform: "linux"
package: "aolserver4"
version: "4.0.10-7"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/Ns_Pathname"
---

# Ns\_PathIsAbsolute(3)

Pathname procedures

Part of [Ns\_Pathname(3)](/Ns_Pathname/3.md).

```

```

## NAME

Ns\_MakePath, Ns\_NormalizePath, Ns\_PathIsAbsolute - Pathname procedures

## SYNOPSIS

```
#include "ns.h"

char *
Ns_MakePath(Ns_DString *dest, ...)

char *
Ns_NormalizePath(Ns_DString *dsPtr, char *path)

int
Ns_PathIsAbsolute(char *path)
```

## DESCRIPTION

These functions operate on file pathnames. They work with Unix and Windows pathnames on their respective hosts.

- **Ns\_MakePath**(*dest, ...*)

  Construct a path name from a list of path elements. The Ns\_MakePath function constructs a path name by appending a list of path elements to the given Ns\_DString. The path elements are separated by single slashes, and the resulting path name is appended to the given Ns\_DString. The last argument needs to be NULL to indicate the end of the argument list.

- **Ns\_NormalizePath**(*dsPtr, path*)

  Normalize a path name. This function removes any extraneous slashes from the path and resolves "." and ".."  references. The result is appended to the given Ns\_DString. The following code appends "/dog" to the Ns\_DString:

  ```
  Ns_NormalizePath(&ds,
      "/dog/cat/../../rat/../../dog//mouse/..");
  ```

- **Ns\_PathIsAbsolute**(*path*)

  Check for an absolute path name. Return NS\_TRUE if the path is absolute and NS\_FALSE otherwise. Under Unix, an absolute path starts with a "/". On Windows, it starts with a drive letter followed immediately by a ":".

## SEE ALSO

nsd(1), [info(n)](/info/n.md)

## KEYWORDS
