---
title: fileOwnerAccountName()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/nsdictionary/fileowneraccountname()
---

# fileOwnerAccountName()

Returns the file’s owner account name.

## Declaration

```swift
func fileOwnerAccountName() -> String?
```

## Return Value

Return Value The value associated with the ownerAccountName file attributes key, or nil if the file attributes dictionary has no entry for the key.

## See Also

### Accessing File Attributes

- [fileSize()](foundation/nsdictionary/filesize().md)
- [fileType()](foundation/nsdictionary/filetype().md)
- [fileCreationDate()](foundation/nsdictionary/filecreationdate().md)
- [fileModificationDate()](foundation/nsdictionary/filemodificationdate().md)
- [filePosixPermissions()](foundation/nsdictionary/fileposixpermissions().md)
- [fileOwnerAccountID()](foundation/nsdictionary/fileowneraccountid().md)
- [fileGroupOwnerAccountID()](foundation/nsdictionary/filegroupowneraccountid().md)
- [fileGroupOwnerAccountName()](foundation/nsdictionary/filegroupowneraccountname().md)
- [fileExtensionHidden()](foundation/nsdictionary/fileextensionhidden().md)
- [fileIsImmutable()](foundation/nsdictionary/fileisimmutable().md)
- [fileIsAppendOnly()](foundation/nsdictionary/fileisappendonly().md)
- [fileSystemFileNumber()](foundation/nsdictionary/filesystemfilenumber().md)
- [fileSystemNumber()](foundation/nsdictionary/filesystemnumber().md)
- [fileHFSTypeCode()](foundation/nsdictionary/filehfstypecode().md)
- [fileHFSCreatorCode()](foundation/nsdictionary/filehfscreatorcode().md)
