Need to create this type of object (from kivy.properties & Kivy filechooser)
ObjectProperty(FileSystemLocal(), baseclass=FileSystemAbstract)
Need to create this type of object (from kivy.properties & Kivy filechooser)
ObjectProperty(FileSystemLocal(), baseclass=FileSystemAbstract)
The
FileSystemLocal
class is a simple interface to someos
andos.path
methods. For example, thelistdir()
method ofFileSystemLocal
is simply a call toos.listdir()
. So it is not specific to any directory, it is just specific to the localos
andos.path
. So, technically, the answer is no.Perhaps you could define your own
FileSystemLocal
subclass that meets your requirements.Here is an example of an extension of
FileSystemLocal
that uses a specific directory:This can be used as:
Note:
FileSystemLocalDir
is based heavily onFileSystemLocal
.dir=
in the constructor sets the default directory that is consulted for all the methods ofFileSystemLocalDir
.dir=
argument is not provided, theFileSystemLocalDir
is equivalent toFileSystemLocal
.FileSystemLocalDir
begins with a/
, it is treated as an absolute path and the provided default directory is ignored (this is an effect of the use ofos.join
).