21 Commits

Author SHA1 Message Date
Cosimo Lupo
337a68715e [filesystem] getinfo now returns a namespace, not a dict
We bumped the minimum required fonttools to 3.10, so
we can use the backported SimpleNamespace as the return
value of _NOFS.getinfo method.
2017-07-21 13:41:14 +01:00
Cosimo Lupo
1de6eb1eb5 [filesystem] pass create=True to movedir
otherwise it raises `ResourceNotFound`
2017-07-21 13:33:15 +01:00
Cosimo Lupo
590d00ba11 [filesystem] use unicode strings for path names
as pyfilesystem2 works internally with unicode strings, some methods
(e.g. self._fs.exists()) fail with TypeError if passed bytes strings
(on python 2 bytes == str).

We decode bytes path strings using the system's default filesystem
encoding.
2017-07-21 13:29:33 +01:00
Cosimo Lupo
62cc1c5805 [filesystem] allow to init FileSystem class from another instance 2017-07-21 13:23:04 +01:00
Cosimo Lupo
07ba88f55a [filesystem] fs.zipfs module no longer exports ZipOperError
it's unused anyway
2017-07-21 13:13:15 +01:00
Cosimo Lupo
758307d8bb [filesystem] use os.path if not haveFS 2017-07-21 12:59:56 +01:00
Cosimo Lupo
af8b0e3224 [filesystem] use removetree as removedir was removed from pyfilesystem2
https://github.com/PyFilesystem/pyfilesystem2/issues/32
2017-07-21 10:14:58 +01:00
Tal Leming
ea54c77670 Don't try to remove the root directory. 2016-06-13 13:33:31 -04:00
Tal Leming
bfba532621 Force the removal of non-empty directories during directory removal. 2016-06-13 13:13:56 -04:00
Tal Leming
a0a942bc7d Make copying a directory from a source to a dest work. 2016-06-08 14:26:01 -04:00
Tal Leming
6043db4f11 Switch to rb mode. 2016-06-08 12:06:35 -04:00
Tal Leming
cea3ba9b43 Fix some minor issues to resolve some failing tests. 2016-06-08 11:09:37 -04:00
Tal Leming
76480ec37f fs.path not self._fs.path. 2016-06-08 10:31:21 -04:00
Tal Leming
c9ced7f718 Use fs.path instead of os.path. 2016-06-07 13:24:30 -04:00
Tal Leming
f5a8299e59 Don't restrict what can be removed at the filesystem level. 2016-05-28 12:02:54 -04:00
Tal Leming
29db50cd01 Remove plistlib shim. 2016-05-16 15:02:19 -04:00
Tal Leming
ca217854ba Remove local testing code. 2016-05-16 14:58:32 -04:00
Tal Leming
173669b265 Add a fallback for OSFS when fs isn't installed. 2016-05-16 14:57:46 -04:00
Tal Leming
08f8f114cb Implement writing to package or ZIP.
This has only been lightly tested. It slightly breaks defcon, but I'll
deal with that later.
2016-05-04 10:53:43 -04:00
Tal Leming
622b7c9352 ZIPs will contain a single root directory that packages will not. Abstract this. 2016-05-03 09:59:26 -04:00
Tal Leming
45910b6131 Initial work on reading single file UFO.
This is a work in progress update of UFOReader and UFOWriter that
supports UFO in its package and zipped forms. Reading works. Writing is
not yet implemented.

I'm building a base file system (that lives on top of fs for now and
maybe in the long term) that the reader and writer then subclass. This
base class implements the file system interaction so that the reader
and writer can be blissfully ignorant about file systems.

Additionally, I ran into a problem with the local plistlib.py creating
an import error, so I've temporarily renamed it plistlibShim.py so that
I can continue working.

Did I mention that this is a work in progress? It's a work in progress.
2016-05-02 23:06:25 -04:00