1. Ronald Oussoren
  2. pyobjc

Source

pyobjc / pyobjc-core / Doc / fsref-fsspec.rst

Support for FSRef and FSSpec

PyObjC has its own wrappers for the types FSRef and FSSpec, and also supports the wrappers for these types in Carbon.File.

Note

All API's using the FSRef type are deprecated by Apple as of Mac OS X 10.8, for most of those APIs there are alternate APIs that use URL objects (:c:type:`NSURL` or :c:type:`CFURL`).

Note

"FSSpec" is a deprecated type in Apple's APIs as of Mac OS X 10.4 . The type is not availble for 64-bit code, and shouldn't be used for new development.

This type represents an opaque FSRef structure.

New instances are created using the from_pathname method:

>>> ref = objc.FSRef.from_pathname("/Libray")
>>> isinstance(ref, objc.FSRef)
True

Instances of objc.FSRef are opaque and don't provide access to specific fields in the structure. The following methods and properties are available to access an instance:

Note

Carbon.File.FSRef instances can be used as the argument of functions that have an FSRef structure as one of their arguments.

This type represents an opaque FSSpec structure. It is not possible to create FSSpec instances in Python code.

Instances of objc.FSSpec are opaque and don't provide access to specific fields in the structure. The following methods and properties are available to access an instance:

Note

Carbon.File.FSSpec instances can be used as the argument of functions that have an FSSpec structure as one of their arguments.