blob: 317b7d2d0efcb04135b0d7b52431727db2801f25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
Rename 'helpers' module to 'path' since it's basically an imitation of os.path.
Minify the contained functions:
- make normpath() do more e.g. collapse backrefs
- remove resolvepath() as it just confuses the issue
- resourcename() -> basename() in line with os.path notation
- remove isabsolutepath(), it wasn't used
Put error class definitions in separate submodule 'errors'
- less redundancy (e.g. no more `raise UnsupportedError("UNSUPPORTED")`)
- deeper exception heirachy (e.g. `ParentDirectoryMissingError`)
This is designed to allow me to be more optimistic; rather than checking all
preconditions before trying an action, I can just let it fail and branch on
the exception. Important for reducing the number of accesses to a remote FS.
Remove the notion of hidden files from the base FS class.
- has lead to several bugs with copying/moving directories
- it's not the filesystem's business to decide what files I want to see
- moved the logic into a separate wrapper class "HideDotFiles"
Remove xattr support from base FS class, making it a separate interface.
- has lead to several bugs with copying/moving files and directories
- now defined in fs.xattrs module
- SimulateXAttr wrapper class contains the same logic
- removexattr() -> delxattr() in line with python's get/set/del tradition
Operational changes to the base methods:
- don't require makedir() to support the "mode" argument, since this only
makes sense for OS-level files.
- when copy() is given an existing directory as destination, raise an error
rather than copying into the directory (explicit is better than implicit)
Split up the test definitions a little:
- use a separate FSTestCases mixin rather than subclassing TestOSFS
- path helpers testcases in their own module
- zipfs in its own module since it's different to all the others
- s3fs in its own module since it's very slow and costs money to test
|