Support for FSRef¶
- class objc.FSRef¶
This type represents an opaque
FSRefstructure.Note
All API’s using the FSRef type are deprecated by Apple as of macOS 10.8, for most of those APIs there are alternate APIs that use URL objects (
NSURLorCFURL).New instances are created using the
from_pathnamemethod:>>> ref = objc.FSRef.from_pathname("/Library") >>> isinstance(ref, objc.FSRef) True
Instances of
objc.FSRefare opaque and don’t provide access to specific fields in the structure. The following methods and properties are available to access an instance:- data¶
A bytestring containing the value of the
FSRefobject.
- as_pathname()¶
Returns the POSIX path for the
FSRefobject.
- __fspath__()¶
Alias for
as_pathname(), which makes it possible to useFSRefinstances as arguments to APIs accepting anos.PathLikeobject.