---
title: "SecCodeCopyPath(_:_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/seccodecopypath(_:_:_:)"
---

# SecCodeCopyPath(_:_:_:)

Retrieves the location on disk of signed code, given a code or static code object.

## Declaration

```swift
func SecCodeCopyPath(_ staticCode: SecStaticCode, _ flags: SecCSFlags, _ path: UnsafeMutablePointer<CFURL?>) -> OSStatus
```

## Parameters

- `staticCode`: The code or static code object whose code you wish to locate. If you provide a code object, the function processes it in the same manner as the doc://com.apple.security/documentation/Security/SecCodeCopyStaticCode(_:_:_:) function.
- `flags`: Optional flags; see doc://com.apple.security/documentation/Security/SecCSFlags for possible values. Pass doc://com.apple.security/documentation/Security/SecCSFlags/kSecCSDefaultFlags for standard behavior.
- `path`: On return, provides a URL identifying the location on disk of the code or static code object. For single files, the URL points to the file. For bundles, it points to the directory containing the entire bundle. In Objective-C, call the doc://com.apple.documentation/documentation/CoreFoundation/CFRelease function to release this object when you are finished with it.

## Return Value

Return Value A result code. See Code Signing Services Result Codes.

## See Also

### Related Documentation

- [SecCodeCopySigningInformation(_:_:_:)](security/seccodecopysigninginformation(_:_:_:).md)
