---
title: "init(fileURL:lineNumber:)"
framework: xctest
role: symbol
role_heading: Initializer
path: "xctest/xctsourcecodelocation/init(fileurl:linenumber:)"
---

# init(fileURL:lineNumber:)

Initializes a new instance with a file URL and a line number.

## Declaration

```swift
init(fileURL: URL, lineNumber: Int)
```

## Parameters

- `fileURL`: A file URL that represents the file-system location of the source code file.
- `lineNumber`: An integer that represents a line of code in the source code file.

## See Also

### Initializers

- [init(filePath:lineNumber:)](xctest/xctsourcecodelocation/init(filepath:linenumber:)-3hzmr.md)
- [init(filePath:lineNumber:)](xctest/xctsourcecodelocation/init(filepath:linenumber:)-8qw52.md)
