You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Standardize and enforce behaviour of FS.removetree("/") #471
FSTestCase never tests removetree("/"), so the behaviour is undefined at the moment. Dependending on the implementations;
fs.base.FS.removetree("/") will just remove all the entries in the root folder, but not the root folder itself
fs.wrapfs.WrapFS.removetree("/") will raise RemoveRootError
The first implementation is most better on a usage perspective, because it makes it easier to clear an entire filesystem, while not being too confusing provided this special case is well documented. However it may be harder to reproduce in dedicated
implementations of the removetree method (in OSFS or FTPFS for instance).
removetree("/") will now remove every entry from the root folder, without removing the root folder itself. This is now tested for in fs.test.FSTestCase.
Activity
althonos commentedon Mar 27, 2021
removetree("/")will now remove every entry from the root folder, without removing the root folder itself. This is now tested for infs.test.FSTestCase.