0

我需要通过套接字发送这个对象,但找不到方法(pickle 在这里不起作用,也不能将此对象转换为字节)

ObjectProperty(FileSystemLocal(), baseclass=FileSystemAbstract)

这是文件系统本地:

class FileSystemLocal(FileSystemAbstract):
'''Implementation of :class:`FileSystemAbstract` for local files.

.. versionadded:: 1.8.0
'''

def listdir(self, fn):
    return listdir(fn)

def getsize(self, fn):
    return getsize(fn)

def is_hidden(self, fn):
    if platform == 'win':
        if not _have_win32file:
            return False
        try:
            return GetFileAttributesExW(fn)[0] & FILE_ATTRIBUTE_HIDDEN
        except error:
            # This error can occurred when a file is already accessed by
            # someone else. So don't return to True, because we have lot
            # of chances to not being able to do anything with it.
            Logger.exception('unable to access to <%s>' % fn)
            return True

    return basename(fn).startswith('.')

def is_dir(self, fn):
    return isdir(fn)
4

0 回答 0