Contents

CFURLCreateWithFileSystemPath(_:_:_:_:)

Creates a CFURL object using a local file system path string.

Declaration

func CFURLCreateWithFileSystemPath(_ allocator: CFAllocator!, _ filePath: CFString!, _ pathStyle: CFURLPathStyle, _ isDirectory: Bool) -> CFURL!

Parameters

  • allocator:

    The allocator to use to allocate memory for the new CFURL object. Pass NULL or Kcfallocatordefault to use the current default allocator.

  • filePath:

    The path string to convert to a CFURL object.

  • pathStyle:

    The operating system path style used in filePath. See Cfurlpathstyle for a list of possible values.

  • isDirectory:

    A Boolean value that specifies whether filePath is treated as a directory path when resolving against relative path components. Pass true if the pathname indicates a directory, false otherwise.

Return Value

A new CFURL object. Ownership follows the create rule. See The Create Rule.

Discussion

If filePath is not absolute, the resulting URL will be considered relative to the current working directory (evaluated when this function is being invoked).

See Also

Creating a CFURL