1Support for ``FSRef`` and ``FSSpec``
2====================================
3
4PyObjC has its own wrappers for the types ``FSRef`` and ``FSSpec``, and also
5supports the wrappers for these types in ``Carbon.File``.
6
7.. class:: objc.FSRef
8
9    This type represents an opaque ``FSRef`` structure.
10
11    New instances are created using the ``from_pathname`` method:
12    .. sourcecode:: pycon
13    
14        >>> ref = objc.FSRef.from_pathname("/Libray")
15        >>> isinstance(ref, objc.FSRef)
16        True
17    
18    Instances of ``objc.FSRef`` are opaque and don't provide access to 
19    specific fields in the structure. The following methods and properties
20    are available to access an instance:
21
22    .. attribute:: data
23
24        A bytestring containing the value of the ``FSRef`` object.
25
26    .. method:: as_pathname
27
28        Returns the POSIX path for the ``FSRef`` object.
29
30    .. method:: as_carbon
31
32        Returns a ``Carbon.File.FSRef`` instance for the ``FSRef`` object.
33
34        NOTE: This method is only available when ``Carbon`` support is
35        enabled in the Python build.
36
37    NOTE: ``Carbon.File.FSRef`` instances can be used as the argument
38    of functions that have an ``FSRef`` structure as one of their
39    arguments.
40
41.. class:: objc.FSSpec
42
43    This type represents an opaque ``FSSpec`` structure. It is not possible
44    to create ``FSSpec`` instances in Python code.
45
46    Instances of ``objc.FSSpec`` are opaque and don't provide access to 
47    specific fields in the structure. The following methods and properties
48    are available to access an instance:
49
50    .. attribute:: aref.data
51
52        A bytestring containing the value of the ``FSRef`` object.
53
54    .. method:: aref.as_carbon
55
56        Returns a ``Carbon.File.FSRef`` instance for the ``FSRef`` object.
57
58        NOTE: This method is only available when ``Carbon`` support is
59        enabled in the Python build.
60    
61    NOTE: ``Carbon.File.FSSpec`` instances can be used as the argument
62    of functions that have an ``FSSpec`` structure as one of their
63    arguments.
64