def _get_total_size_and_type(self, path):
        """
		returns the file/dir size and the type. Copied from:
		http://stackoverflow.com/questions/22090001/get-folder-size-using-ftplib
		This is a modified version.
		"""
        size = 0
        op = self.ftp.pwd()
        try:
            self.ftp.cwd(path)
            self.log("stat: cwd worked (->IsDir)\n")
        except:
            # TODO: raise Exception if file does not exists
            self.log("stat: cwd failed (->IsFile or NotFound)\n")
            try:
                size = self.ftp.size(path)
            except:
                size = None
            if size is None:
                self.log("stat: size failed (->NotFound)\n")
                raise OperationFailure("NotFound!")
            self.log("stat: size worked (->IsFile)\n")
            return (size, stat.S_IFREG)
        finally:
            self.ftp.cwd(op)
        return (1, stat.S_IFDIR)

		returns the file/dir size and the type. Copied from:
		http://stackoverflow.com/questions/22090001/get-folder-size-using-ftplib
		This is a modified version.
		
lib/stashutils/fsi/FTP.py