<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/shared-module/os/__init__.c, branch 6.1.0-alpha.0</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.1.0-alpha.0</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.1.0-alpha.0'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2020-07-06T18:16:25+00:00</updated>
<entry>
<title>Add license to some obvious files.</title>
<updated>2020-07-06T18:16:25+00:00</updated>
<author>
<name>Diego Elio Pettenò</name>
<email>flameeyes@flameeyes.com</email>
</author>
<published>2020-06-03T22:40:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=34b4993d63a6b576f29d624385c681f679b4124c'/>
<id>urn:sha1:34b4993d63a6b576f29d624385c681f679b4124c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>os_listdir: This can be long-running, run background tasks</title>
<updated>2019-09-10T01:14:02+00:00</updated>
<author>
<name>jepler</name>
<email>jepler@gmail.com</email>
</author>
<published>2019-09-10T01:04:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=676f7aa80821aa681030a5c43ce7e6c03b65241b'/>
<id>urn:sha1:676f7aa80821aa681030a5c43ce7e6c03b65241b</id>
<content type='text'>
While finding sources of clicks and buzzes in nrf i2sout, I identified
this site as one which could be long running.  Reproducer code was to
play a 22.05kHz sample and repeatedly print `os.listdir('')`
</content>
</entry>
<entry>
<title>shared-module/os: Fix os.mkdir('a/b')</title>
<updated>2018-11-09T18:20:56+00:00</updated>
<author>
<name>Noralf Trønnes</name>
<email>noralf@tronnes.org</email>
</author>
<published>2018-11-09T17:25:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=28383afa11863f1fe289cc811c8eab403ea79f6f'/>
<id>urn:sha1:28383afa11863f1fe289cc811c8eab403ea79f6f</id>
<content type='text'>
This fixes commit a99f9427420d("'/' and '\' are also acceptable ends of the path now") which broke mkdir.
The problem is where the directory name is a single letter like this:
&gt;&gt;&gt; os.mkdir('a')
&gt;&gt;&gt; os.mkdir('a/b')
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
OSError: [Errno 17] File exists
&gt;&gt;&gt; os.mkdir('a/bb')
&gt;&gt;&gt;

I wasn't smart enough to fix this in the oofatfs library, so I did it in the os shared module by
creating a path lookup function for the os methods that only deals with directories. I reverted
the library change introduced by the aforementioned commit.

This means that os.stat and os.rename can't handle trailing slashes. This is to avoid allowing
filenames with trailing slashes to pass through. In order to handle trailing slashes for these
it would be necessary to check if it really is a directory before stripping. I didn't do this
since the original issue was to make os.chdir tolerate trailing slashes.

There's an open MicroPython issue #2929 wrt. trailing slashes and mkdir.
</content>
</entry>
<entry>
<title>WIP: complete manual inspection of all significant changes</title>
<updated>2018-07-24T01:34:25+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2018-07-24T01:34:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=bc760dd34100099c352a0f185ec54ceae23d036d'/>
<id>urn:sha1:bc760dd34100099c352a0f185ec54ceae23d036d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>compiles and runs; hangs on import storage;storage.VfsFat.&lt;tab&gt;</title>
<updated>2018-07-14T02:51:10+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2018-07-14T02:51:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e2e01efa84d2ed46d004edf48076e4701accc176'/>
<id>urn:sha1:e2e01efa84d2ed46d004edf48076e4701accc176</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix os.listdir() when current dir is '/'</title>
<updated>2018-06-15T14:51:03+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2018-06-15T14:51:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=327b0f76dac55a4bfe5df52799f72734623a351a'/>
<id>urn:sha1:327b0f76dac55a4bfe5df52799f72734623a351a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>shared-module: Fix os.listdir to correctly return list rather than</title>
<updated>2017-06-28T19:51:32+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott.shawcroft@gmail.com</email>
</author>
<published>2017-06-28T19:51:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c797f3cb240e49f53b49c464caeacfea3e16d9e7'/>
<id>urn:sha1:c797f3cb240e49f53b49c464caeacfea3e16d9e7</id>
<content type='text'>
iterator.
</content>
</entry>
<entry>
<title>Split uos module into os and storage.</title>
<updated>2017-06-27T22:17:30+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott.shawcroft@gmail.com</email>
</author>
<published>2017-06-27T22:17:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=778e975936b9e892c4f1b85ce73462a0ce6d36d2'/>
<id>urn:sha1:778e975936b9e892c4f1b85ce73462a0ce6d36d2</id>
<content type='text'>
os is a subset of CPython's os. storage contains additional
file system mounting functionality based on UNIX's mount
management.

Fixes #140
</content>
</entry>
</feed>
