Re: definition of storage



Hi Lutz,

On 23 Dec 2000, Lutz [ISO-8859-1] Müller wrote:
> GnoCam now ships with a storage module "libstorage_camera". This
> module handles streams (read/write) and deletion of storages (= files
> on the memory card of your digital camera).

	Great.

> While trying to implement upload, I realized that I can't simply use
> Bonobo_Storage_copyTo as the fs-storage-module refuses to create a
> storage out of a file. It only accepts directories. That raises the
> question: What is a storage?

	copyTo is a seriously badly broken interface; its definition is
unclear, and its implementation is not clever. Please do not use this API.

	What a storage is however is more clear; the Storage interface
maps to the Unix directory interface, the Stream interface maps
approximately to the file interface. In the same way that 'unlink'
doesn't work on a file handle, but rather at the directory level, erase is
on the Storage interface. Clearly erase erases both storages and streams
however.

> You can erase storages, you can't erase streams.

	That sounds like a bug in our storage implementation; strange.

> Therefore, I would guess that storages correspond to both files _and_
> directories. Am I right?

	The storage interface is an interface to a directory of items
which can be accessed as streams ( if they are file-like ) or storages (
if they are directory like ). 

	Does that help ?

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]