# path.isRelativePath

Function · category: Other

Source: https://github.com/playcanvas/engine/blob/b5b983982a9860d21e0c1dafb2f85f72e2c01afb/src/core/path.js#L165

```ts
isRelativePath(pathname: string): boolean
```

Check if a string s is relative path.

**Parameters**

- `pathname` (`string`): The path to process.

**Returns** `boolean`: True if s doesn't start with slash and doesn't include colon and double
slash.

**Example**

```ts
path.isRelativePath("file.txt"); // returns true
path.isRelativePath("path/to/file.txt"); // returns true
path.isRelativePath("./path/to/file.txt"); // returns true
path.isRelativePath("../path/to/file.jpg"); // returns true
path.isRelativePath("/path/to/file.jpg"); // returns false
path.isRelativePath("http://path/to/file.jpg"); // returns false
```
