Opensprings File Module – version0.1 – Demo Release
Copyright (C) 2003 Hotsprings Inc.
For conditions of distribution and use, see copyright notice Location: www.HotspringsInc.com
Description:
This module offers platform independent file manipulation objects.
FileName encapsulates the concept of a file name. It is not just a string. The correct operators on filenames allow accessing the parent dir name, the file extension, the base name and of course a file name can be used to query properties of the file itself and to open it. FileNames can be converted to and from String objects according to their representation on one OS or another.
SpecialFileNames: each operating system has a set of special folder names, each user may have preferred places where he stores his downloads, each application has a folder for its binary and for its resources. The SpecialFileNames object stores in a platform independent way these settings. FileProperties: a file has a size, some access rights, a name, creation time, modification time and some other properties. This class allows you to query and manipulate those properties.
FileList: The result of a folder content query, or a file search query. Instances of this class can store collections of file names.
FileFind: an algorithm to find files based on a pattern. Deep (recursive) searches are supported.
FileForkList: Enumerates the forks available in a file. Linux based and Win-FAT file systems do not support forks so only the main fork is listed for those. On MacOS we get the data fork and the resource fork. On Win-NTFS we get any number of ile streams.
OpenedFile: after a file is opened an object of this type is available to allow querries and manipulation of the file content. Read, Write access is atomic and requires the position where in the file the operation should act (there is no independent seek/pos operation).
FileModule: a singleton class with the static objects in this module ( an initialized instance of the special file names object is available here ).
|
|
|