Pharo FIleSystem Compatibility with Gemstone's FileSystemGs

Reg Krock rkrock3 at yahoo.ca
Tue Dec 11 12:19:28 EST 2018


Hi,

I am working on making changes to FileSystemGs to make it work in Gemstone.

Who is or the the persons to talk to about changes on the Pharo side.

Areas of exploration to date have been:
Replacement of File with GsFile - in Gemstone we want to use the native file class.
Introduction of a FileMode class hierarchy to replace the passing of they symbols #read and #write.
Added the proof of concept of FileMode with subclasses to be passed instead of #write and #read. The classes which have been introduced are:

			FileMode 
				FileAppendMode
					FileAppendAndReadMode
						FileAppendAndReadBinaryMode
					FileAppendBinaryMode
				FileReadMode
					FileReadBinaryMode
				FileReadWriteMode
					FileReadWriteMode
						FileReadWriteBinaryMode
						FileReadWriteTruncatedMode
							FileReadWriteTruncatedBinaryMode
				FileWriteMode
					FileWriteBinaryMode
These classes return the appropriate mode string, (ex: ‘w+’) and know if the file is writable.Example of change - the text in blue shows the change.

				Exiting format:
					(filesystem open: aFileReference path writable: #write) 

				Proposed format:
					(filesystem open: aFileReference path writable: self store readWriteTruncatedMode) 

The #readWriteTruncatedMode method would return an instance of FileReadWriteTruncatedMode

If a form of this proposal were to be adopted, then the appropriate methods should be renamed to have mode.
As an example, #open:writeable:  would become #open:mode:

Thanks for your help.

Reg 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20181211/81ea4f4f/attachment.html>


More information about the Pharo-dev mailing list