VM Maker: FileAttributesPlugin.oscog-eem.33.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VM Maker: FileAttributesPlugin.oscog-eem.33.mcz

commits-2
 
Eliot Miranda uploaded a new version of FileAttributesPlugin to project VM Maker:
http://source.squeak.org/VMMaker/FileAttributesPlugin.oscog-eem.33.mcz

==================== Summary ====================

Name: FileAttributesPlugin.oscog-eem.33
Author: eem
Time: 24 August 2018, 1:08:38.677155 pm
UUID: fbd87485-1e80-4038-a90a-b2ead62ae916
Ancestors: FileAttributesPlugin.oscog-AlistairGrant.32

Provide some class side methods for testing the plugin.

=============== Diff against FileAttributesPlugin.oscog-AlistairGrant.32 ===============

Item was added:
+ ----- Method: FileAttributesPlugin class>>primFileAttributeOf:number: (in category 'testing') -----
+ primFileAttributeOf: pathString number: attributeNumber
+ "Answer a single file attribute.
+ pathString is the path to the file
+ attributeNumber identifies which attribute to return:
+ 1 - 12: stat(): name, mode, ino, dev, nlink, uid, gid, size, accessDate, modifiedDate, changeDate, creationDate
+ 13 - 15: access(): R_OK, W_OK, X_OK
+ 16: isSymlink
+ On error, fail with an error code containing the appropriate OS error code."
+
+ "(1 to: 16) collect: [:i| self primFileAttributeOf: '.' number: i]"
+ "(1 to: 16) collect: [:i| self primFileAttributeOf: 'THIS HAS A GOOD CHANCE OF FAILING' number: i]"
+
+ <primitive: 'primitiveFileAttribute' module: 'FileAttributesPlugin' error: ec>
+ ^self primitiveFailed!

Item was added:
+ ----- Method: FileAttributesPlugin class>>primFileAttributes:attributeNumber: (in category 'testing') -----
+ primFileAttributes: pathString attributeNumber: attributeNumber
+ "Answer a single file attribute.
+ primFileAttributes: aString attributeNumber: attributeNumber
+ pathString is the path to the file
+ attributeNumber identifies which attribute to return:
+ 1 - 12: stat(): name, mode, ino, dev, nlink, uid, gid, size, accessDate, modifiedDate, changeDate, creationDate
+ 13 - 15: access(): R_OK, W_OK, X_OK
+ 16: isSymlink
+ On error, fail with an error code containing the appropriate OS error code."
+
+ "(1 to: 16) collect: [:i| self installedFileAttributeFor: '.' numbered: i]"
+ "(1 to: 16) collect: [:i| self installedFileAttributeFor: 'THIS HAS A GOOD CHANCE OF FAILING' numbered: i]"
+
+ <primitive: 'primitiveFileAttribute' module: 'FileAttributesPlugin' error: ec>
+ ^self primitiveFailed!