---
title: appendToFile
framework: corefoundation
role: symbol
role_heading: Type Property
path: corefoundation/cfstreampropertykey/appendtofile
---

# appendToFile

Value is a CFBoolean value that indicates whether to append the written data to a file, if it already exists, rather than to replace its contents.

## Declaration

```swift
static let appendToFile: CFStreamPropertyKey!
```

## Discussion

Discussion You must set this value before opening the writable file stream. The default value is kCFBooleanFalse, indicating that the stream should replace any pre-existing file. You cannot read this value.

## See Also

### Constants

- [dataWritten](corefoundation/cfstreampropertykey/datawritten.md)
- [fileCurrentOffset](corefoundation/cfstreampropertykey/filecurrentoffset.md)
- [socketNativeHandle](corefoundation/cfstreampropertykey/socketnativehandle.md)
- [socketRemoteHostName](corefoundation/cfstreampropertykey/socketremotehostname.md)
- [socketRemotePortNumber](corefoundation/cfstreampropertykey/socketremoteportnumber.md)
- [kCFStreamPropertyShouldCloseNativeSocket](corefoundation/kcfstreampropertyshouldclosenativesocket.md)
- [kCFStreamPropertySocketSecurityLevel](corefoundation/kcfstreampropertysocketsecuritylevel.md)
- [kCFStreamPropertySSLPeerCertificates](cfnetwork/kcfstreampropertysslpeercertificates.md)
- [kCFStreamPropertySSLPeerTrust](cfnetwork/kcfstreampropertysslpeertrust.md)
- [kCFStreamPropertySSLSettings](cfnetwork/kcfstreampropertysslsettings.md)
- [kCFStreamPropertySSLContext](cfnetwork/kcfstreampropertysslcontext.md)
- [kCFStreamPropertySOCKSProxy](corefoundation/kcfstreampropertysocksproxy.md)
- [kCFStreamPropertyProxyLocalBypass](cfnetwork/kcfstreampropertyproxylocalbypass.md)
- [kCFStreamPropertySocketRemoteHost](cfnetwork/kcfstreampropertysocketremotehost.md)
- [kCFStreamPropertySocketRemoteNetService](cfnetwork/kcfstreampropertysocketremotenetservice.md)
