# FileSpecification Class

> Refers to the location of a PDF file within a file system.

- Product: Adobe PDF Library 21
- Language: Modern C++
- Version: 21.4.0
- HTML page: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification
- Version index: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/llms.txt

```cpp
class FileSpecification
```

**Namespace:** `datalogics_interface`

## Description

Refers to the location of a PDF file within a file system.

The PDF file system is known more commonly as the file path name.

The reference can be either absolute, as in a complete path name, or relative to the current place in a directory structure.

**Referenced by:** [`LaunchAction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LaunchAction.md), [`RemoteGoToAction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteGoToAction.md)

**Uses types:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)

## Constructors

### FileSpecification

```cpp
datalogics_interface::FileSpecification::FileSpecification(Document &doc, const std::string &path)
```

*constructor*

**Parameters**

- `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The document in which the file specification is created.
- `path` (`const std::string &`): The string corresponding to the path of the file to reference. It may be relative or absolute.

Creates a new file specification object.

### FileSpecification

```cpp
datalogics_interface::FileSpecification::FileSpecification(FileSpecification &&) noexcept
```

*constructor*

**Parameters**

- (unnamed) ([`FileSpecification &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md))

### ~FileSpecification

```cpp
datalogics_interface::FileSpecification::~FileSpecification()
```

*destructor*

## Methods

### get_path

```cpp
std::string datalogics_interface::FileSpecification::get_path() const
```

**Returns:** `std::string`

The file path as a string, which may be relative or absolute.

Gets the path to the file referenced.

### get_pdf_object

```cpp
std::unique_ptr< PDFObject > datalogics_interface::FileSpecification::get_pdf_object()
```

**Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)

The underlying PDFObject for this FileSpecification.

Retrieve the PDFObject representation of this object.

### operator=

```cpp
FileSpecification & datalogics_interface::FileSpecification::operator=(FileSpecification &&) noexcept
```

**Parameters**

- (unnamed) ([`FileSpecification &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md))

**Returns:** [`FileSpecification &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md)

### to_string

```cpp
std::string datalogics_interface::FileSpecification::to_string() const
```

**Returns:** `std::string`

The path to the file referenced by this FileSpecification.

Returns a string representation of this FileSpecification.

The returned value is the file path referenced by this specification.
