Linux sagir-us1.hostever.us 5.14.0-570.51.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 8 09:41:34 EDT 2025 x86_64
LiteSpeed
Server IP : 104.247.108.91 & Your IP : 216.73.216.26
Domains : 74 Domain
User : georgeto
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
doc /
python3-llfuse /
html /
.doctrees /
Delete
Unzip
Name
Size
Permission
Date
Action
about.doctree
10.45
KB
-rw-r--r--
2021-02-01 20:07
changes.doctree
78.18
KB
-rw-r--r--
2021-02-01 20:07
data.doctree
45.45
KB
-rw-r--r--
2021-02-01 20:22
environment.pickle
1.64
MB
-rw-r--r--
2021-02-01 20:22
example.doctree
79.57
KB
-rw-r--r--
2021-02-01 20:07
fuse_api.doctree
34.19
KB
-rw-r--r--
2021-02-01 20:22
general.doctree
20.07
KB
-rw-r--r--
2021-02-01 20:07
gotchas.doctree
5.36
KB
-rw-r--r--
2021-02-01 20:07
index.doctree
4.38
KB
-rw-r--r--
2021-02-01 20:07
install.doctree
19.21
KB
-rw-r--r--
2021-02-01 20:07
lock.doctree
18.36
KB
-rw-r--r--
2021-02-01 20:22
operations.doctree
146.99
KB
-rw-r--r--
2021-02-01 20:22
util.doctree
20.38
KB
-rw-r--r--
2021-02-01 20:22
Save
Rename
��h �sphinx.addnodes��document���)��}�(� rawsource�� ��children�]��docutils.nodes��section���)��}�(hhh]�(h �title���)��}�(h�Common Gotchas�h]�h �Text����Common Gotchas�����}�(hh�parent�hhh�source�N�line�Nuba� attributes�}�(�ids�]��classes�]��names�]��dupnames�]��backrefs�]�u�tagname�hhhhhh�*/home/user/w/python-llfuse/rst/gotchas.rst�hKubh � paragraph���)��}�(h�>This chapter lists some common gotchas that should be avoided.�h]�h�>This chapter lists some common gotchas that should be avoided.�����}�(hh0hh.hhhNhNubah}�(h ]�h"]�h$]�h&]�h(]�uh*h,hh+hKhhhhubh)��}�(hhh]�(h)��}�(h�!Removing inodes in unlink handler�h]�h�!Removing inodes in unlink handler�����}�(hhAhh?hhhNhNubah}�(h ]�h"]�h$]�h&]�h(]�uh*hhh<hhhh+hKubh-)��}�(h�bIf your file system is mounted at :file:`mnt`, the following code should complete without errors::�h]�(h�"If your file system is mounted at �����}�(h�"If your file system is mounted at �hhMhhhNhNubh �literal���)��}�(h�:file:`mnt`�h]�h�mnt�����}�(h�mnt�hhXubah}�(h ]�h"]��file�ah$]�h&]�h(]��role��file�uh*hVhhMubh�4, the following code should complete without errors:�����}�(h�4, the following code should complete without errors:�hhMhhhNhNubeh}�(h ]�h"]�h$]�h&]�h(]�uh*h,hh+hK hh<hhubh � literal_block���)��}�(hX: with open('mnt/file_one', 'w+') as fh1: fh1.write('foo') fh1.flush() with open('mnt/file_one', 'a') as fh2: os.unlink('mnt/file_one') assert 'file_one' not in os.listdir('mnt') fh2.write('bar') os.close(os.dup(fh1.fileno())) fh1.seek(0) assert fh1.read() == 'foobar'�h]�hX: with open('mnt/file_one', 'w+') as fh1: fh1.write('foo') fh1.flush() with open('mnt/file_one', 'a') as fh2: os.unlink('mnt/file_one') assert 'file_one' not in os.listdir('mnt') fh2.write('bar') os.close(os.dup(fh1.fileno())) fh1.seek(0) assert fh1.read() == 'foobar'�����}�(hhhhwubah}�(h ]�h"]�h$]�h&]�h(]�� xml:space��preserve�uh*huhh+hKhh<hhubh-)��}�(h��If you're getting an error, then you probably did a mistake when implementing the `~Operations.unlink` handler and are removing the file contents when you should be deferring removal to the `~Operations.forget` handler.�h]�(h�TIf you’re getting an error, then you probably did a mistake when implementing the �����}�(h�RIf you're getting an error, then you probably did a mistake when implementing the �hh�hhhNhNubh �pending_xref���)��}�(h�`~Operations.unlink`�h]�hW)��}�(hh�h]�h�unlink�����}�(hhhh�ubah}�(h ]�h"]�(�xref��py��py-obj�eh$]�h&]�h(]�uh*hVhh�ubah}�(h ]�h"]�h$]�h&]�h(]��refdoc��gotchas�� refdomain�h��reftype��obj��refexplicit���refwarn��� py:module��llfuse��py:class�N� reftarget��Operations.unlink�uh*h�hh+hKhh�ubh�X handler and are removing the file contents when you should be deferring removal to the �����}�(h�X handler and are removing the file contents when you should be deferring removal to the �hh�hhhNhNubh�)��}�(h�`~Operations.forget`�h]�hW)��}�(hh�h]�h�forget�����}�(hhhh�ubah}�(h ]�h"]�(h��py��py-obj�eh$]�h&]�h(]�uh*hVhh�ubah}�(h ]�h"]�h$]�h&]�h(]��refdoc�h�� refdomain�hˌreftype��obj��refexplicit���refwarn��h�h�h�Nh��Operations.forget�uh*h�hh+hKhh�ubh� handler.�����}�(h� handler.�hh�hhhNhNubeh}�(h ]�h"]�h$]�h&]�h(]�uh*h,hh+hKhh<hhubeh}�(h ]��!removing-inodes-in-unlink-handler�ah"]�h$]��!removing inodes in unlink handler�ah&]�h(]�uh*h hhhhhh+hKubeh}�(h ]��common-gotchas�ah"]�h$]��common gotchas�ah&]�h(]�uh*h hhhhhh+hKubah}�(h ]�h"]�h$]�h&]�h(]��source�h+uh*h�current_source�N�current_line�N�settings��docutils.frontend��Values���)��}�(hN� generator�N� datestamp�N�source_link�N� source_url�N� toc_backlinks��entry��footnote_backlinks�K� sectnum_xform�K�strip_comments�N�strip_elements_with_classes�N� strip_classes�N�report_level�K� halt_level�K�exit_status_level�K�debug�N�warning_stream�N� traceback���input_encoding��utf-8��input_encoding_error_handler��strict��output_encoding��utf-8��output_encoding_error_handler�j �error_encoding��UTF-8��error_encoding_error_handler��backslashreplace�� language_code��en��record_dependencies�N�config�N� id_prefix�h�auto_id_prefix��id�� dump_settings�N�dump_internals�N�dump_transforms�N�dump_pseudo_xml�N�expose_internals�N�strict_visitor�N�_disable_config�N�_source�h+�_destination�N� _config_files�]��pep_references�N�pep_base_url�� https://www.python.org/dev/peps/��pep_file_url_template��pep-%04d��rfc_references�N�rfc_base_url��https://tools.ietf.org/html/�� tab_width�K�trim_footnote_reference_space���file_insertion_enabled���raw_enabled�K�syntax_highlight��long��smart_quotes���smartquotes_locales�]��character_level_inline_markup���doctitle_xform��� docinfo_xform�K�sectsubtitle_xform���embed_stylesheet���cloak_email_addresses���env�Nub�reporter�N�indirect_targets�]��substitution_defs�}��substitution_names�}��refnames�}��refids�}��nameids�}�(h�h�h�h�u� nametypes�}�(h�Nh�Nuh }�(h�hh�h<u� footnote_refs�}�� citation_refs�}�� autofootnotes�]��autofootnote_refs�]��symbol_footnotes�]��symbol_footnote_refs�]�� footnotes�]�� citations�]��autofootnote_start�K�symbol_footnote_start�K � id_counter��collections��Counter���}���R��parse_messages�]��transform_messages�]��transformer�N� decoration�Nhhub.