Skip to content

Commit

Permalink
Add GRPlatform>>sizeOfFile: for GemStone
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrichau committed Dec 23, 2023
1 parent 5ba98ab commit ce8b337
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
encoding
base64Encode: aByteArray
^ (Base64MimeConverter mimeEncode: aByteArray readStream) contents
^ (Base64MimeConverter mimeEncode: aByteArray readStream) contents
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
file-library
files
contentsOfFile: aString binary: aBoolean
^ self fileStreamOn: aString do: [ :stream | stream contents ] binary: aBoolean
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file-library
files
directoriesIn: aPathString
"Answer a collection of absolute paths for all the directories (no files) in the directory given by aPathString
must not include directory names that start with ."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file-library
files
ensureExistenceOfFolder: aString
"creates a folder named aString in the default server directory"
ServerFileDirectory default assureExistenceOfPath: aString
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
file-library
files
fileExists: aString
^ GsFile existsOnServer: aString
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file-library
files
filesIn: aPathString
"Return a collection of absolute paths for all the files (no directories) in the directory given by aPathString
must not include file names that start with ."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
file-library
files
localNameOf: aFilename
^(ServerFileDirectory on: aFilename) localName
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
file-library
files
pathSeparator
^ FileDirectory pathNameDelimiter asString
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file-library
files
readFileStreamOn: aString do: aBlock binary: aBoolean
| stream dir file |
[
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
files
sizeOfFile: aPathString

^ GsFile sizeOfOnServer: aPathString
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file-library
files
write: aStringOrByteArray toFile: aFileNameString inFolder: aFolderString
"writes aStringOrByteArray to a file named aFilenameString in the folder aFolderString"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file-library
files
writeFileStreamOn: fileName do: aBlock binary: isBinary
| stream |
stream := BinaryOrTextFile open: fileName mode: 'w+b' onClient: false.
Expand Down

0 comments on commit ce8b337

Please sign in to comment.