X Tutup
Skip to content

Commit fd607d1

Browse files
committed
Added #binaryWriteStreamFor:do: and #newTemporaryFileReference to GRPlatform and concrete implementations to GRPharoPlatform and GRSqueakPlatform
1 parent 269986e commit fd607d1

File tree

13 files changed

+62
-19
lines changed

13 files changed

+62
-19
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
file library
2+
binaryWriteStreamFor: aFileReference do: aBlock
3+
"Open a binary writeStream for aFileReference and evaluate aBlock
4+
with the stream as argument.
5+
The stream will be closed after the block has completed."
6+
self subclassResponsibility
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
file library
2+
newTemporaryFileReference
3+
"Create a new temporary file in the systems temp directory
4+
and answer a reference to it.
5+
It is the users responsibility to delete or move the file,
6+
it will not be cleaned up automatically (unless the host system
7+
has a policy for it)."
8+
^ self subclassResponsibility
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
A WASqueakPlatform is the Squeak implementation of SeasidePlatformSupport, the Seaside class that provides functionality that can not be implemented in a platform independent way.
1+
A GRPharoPlatform is the Pharo implementation of GRPlatform, the Grease class that provides functionality that can not be implemented in a platform independent way.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
file library
2+
binaryWriteStreamFor: aFileReference do: aBlock
3+
"Open a binary writeStream for aFileReference and evaluate aBlock
4+
with the stream as argument.
5+
The stream will be closed after the block has completed."
6+
aFileReference binaryWriteStreamDo: aBlock
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
file library
2+
newTemporaryFileReference
3+
"Create a new temporary file in the systems temp directory
4+
and answer a reference to it.
5+
It is the users responsibility to delete or move the file,
6+
it will not be cleaned up automatically (unless the host system
7+
has a policy for it)."
8+
^ FileLocator temp / UUID new asString

repository/Grease-Pharo70-Core.package/GRPharoPlatform.class/properties.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"commentStamp" : "pmm 6/1/2008 01:03",
2+
"commentStamp" : "pmm 2/1/2014 13:28",
33
"super" : "GRPlatform",
44
"category" : "Grease-Pharo70-Core",
55
"classinstvars" : [ ],
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2-
"noMethodMetaData" : true,
32
"separateMethodMetaAndSource" : false,
4-
"useCypressPropertiesFile" : true }
3+
"noMethodMetaData" : true,
4+
"useCypressPropertiesFile" : true
5+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
file library
2+
binaryWriteStreamFor: aFileReference do: aBlock
3+
"Open a binary writeStream for aFileReference and evaluate aBlock
4+
with the stream as argument.
5+
The stream will be closed after the block has completed."
6+
FileDirectory default
7+
fileNamed: aFileReference fullName
8+
do: aBlock
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
file library
2+
newTemporaryFileReference
3+
"Create a new temporary file in the systems temp directory
4+
and answer a reference to it.
5+
It is the users responsibility to delete or move the file,
6+
it will not be cleaned up automatically (unless the host system
7+
has a policy for it)."
8+
^ FileDirectory default / UUID new asString
Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
{
2-
"category" : "Grease-Squeak-Core",
3-
"classinstvars" : [
4-
],
5-
"classvars" : [
6-
],
72
"commentStamp" : "",
8-
"instvars" : [
9-
],
10-
"name" : "GRSqueakPlatform",
11-
"pools" : [
12-
],
133
"super" : "GRPharoPlatform",
14-
"type" : "normal" }
4+
"category" : "Grease-Squeak-Core",
5+
"classinstvars" : [ ],
6+
"pools" : [ ],
7+
"classvars" : [ ],
8+
"instvars" : [ ],
9+
"name" : "GRSqueakPlatform",
10+
"type" : "normal"
11+
}

0 commit comments

Comments
 (0)
X Tutup