<!--
{
  "availability" : [
    "macOS: 15.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FSKit",
  "identifier" : "/documentation/FSKit/FSFileName/init(string:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "FSKit"
    ],
    "preciseIdentifier" : "c:objc(cs)FSFileName(im)initWithString:"
  },
  "title" : "init(string:)"
}
-->

# init(string:)

Creates a filename by copying a character sequence from a string instance.

```
convenience init(string name: String)
```

## Parameters

`name`

The string containing the character sequence to use for the filename.

## Discussion

This initializer copies the UTF-8 representation of the characters in `string`.
If `string` contains a `NUL` character, the sequence terminates.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)