Class e.p.b.l.LocalResource(ResourceProvider):

Part of elisa.plugins.base.local_resource View In Hierarchy

Access resources on the local file system
Line # Kind Name Docs
43 Method __init__ Undocumented
55 Method get This reacts differently in the case you give it a directory. If you
156 Method post change the access and modifcation time with given time=value.
169 Method delete delete a file from the file system
48 Method _listdir wrap os.listdir in a private method that can be overriden in
186 Method _init_com [win32] init the stuff needed for using COM Objects
196 Method _resolve_shortcut [win32] Returns the path refered to by a windows shortcut (.lnk) file.

Inherited from ResourceProvider:

Line # Kind Name Docs
116 Method put Put one resource into another. Both resources are identified with URIs.

Inherited from Component (via ResourceProvider):

Line # Kind Name Docs
85 Class PathDescriptor Undocumented
97 Class Method create Create and initialize the component.
130 Method initialize Initialize the component.
142 Method clean Clean the component.
def __init__(self):
Undocumented
def _listdir(self, path):
wrap os.listdir in a private method that can be overriden in the tests if needed
def get(self, uri, model=None):

This reacts differently in the case you give it a directory. If you want to have the Files of a directory, make sure you have an ending '/' in your request. Otherwise the implementation assumes that you just want to have information about that object (like the size and the modification time). The context model is reused if given. But in case it is a directory listing the Files attribute is cleared before.

Some example requests and the results they return:

  • file:///tmp : empty DirectoryModel with information about the directory itself
  • file://tmp/ : DirectoryModel with all the files (and subdirectories) in it
def post(self, uri, time=None):
change the access and modifcation time with given time=value.
def delete(self, uri):
delete a file from the file system
def _init_com(self):
[win32] init the stuff needed for using COM Objects
def _resolve_shortcut(self, filename):
[win32] Returns the path refered to by a windows shortcut (.lnk) file.
API Documentation for Elisa Media Center, generated by pydoctor at 2009-02-16 19:15:05.