<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/URLFileResourceType",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@T@NSURLFileResourceType"
  },
  "title" : "URLFileResourceType"
}
-->

# URLFileResourceType

Possible values for the type of file resource.

```
struct URLFileResourceType
```

## Topics

### Creating a File Resource Type Instance

[`init(rawValue:)`](/documentation/Foundation/URLFileResourceType/init(rawValue:))

Creates a file resource type from the provided constant string.

### Constants

[`namedPipe`](/documentation/Foundation/URLFileResourceType/namedPipe)

The resource is a named pipe.

[`characterSpecial`](/documentation/Foundation/URLFileResourceType/characterSpecial)

The resource is a character special file.

[`directory`](/documentation/Foundation/URLFileResourceType/directory)

The resource is a directory.

[`blockSpecial`](/documentation/Foundation/URLFileResourceType/blockSpecial)

The resource is a block special file.

[`regular`](/documentation/Foundation/URLFileResourceType/regular)

The resource is a regular file.

[`symbolicLink`](/documentation/Foundation/URLFileResourceType/symbolicLink)

The resource is a symbolic link.

[`socket`](/documentation/Foundation/URLFileResourceType/socket)

The resource is a socket.

[`unknown`](/documentation/Foundation/URLFileResourceType/unknown)

The resource’s type is unknown.



---

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)