Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
79e0599
add FileSystem
NathanMalenge Apr 17, 2026
11b519c
Merge branch 'Pharo14' of github.com:pharo-project/pharo into FileSystem
NathanMalenge Apr 17, 2026
593f483
Refactoring: remove StringTests extensions from FileSystem-Core-Tests
NathanMalenge Apr 17, 2026
a23ddd3
Refactor: add UnifiedFFI dependency to FileSystem tests resolve LibC …
NathanMalenge Apr 17, 2026
745e70b
changed grouptest name
NathanMalenge Apr 17, 2026
2ebee07
Merge branch 'Pharo14' of github.com:pharo-project/pharo into FileSystem
NathanMalenge Apr 17, 2026
fd173bd
add a dependency to System-OSEnvironments
NathanMalenge Apr 17, 2026
84ba5e7
Fix: use UnifiedFFI minimal group for FileSystem tests
NathanMalenge Apr 17, 2026
69f655f
Fix: remove external baseline requirement from package spec
NathanMalenge Apr 17, 2026
1b5af80
add reference to UnifiedFFi and delete group TestFFI
NathanMalenge Apr 17, 2026
1baf9c7
replacement of testFFI by Tests
NathanMalenge Apr 17, 2026
540e56d
add loading guideline for baslineofUnifiedFFi
NathanMalenge Apr 17, 2026
50a8df0
Merge branch 'Pharo14' of github.com:pharo-project/pharo into FileSystem
NathanMalenge Apr 20, 2026
99873b4
add dependendy to OS-Platforms
NathanMalenge Apr 20, 2026
f3fcf3e
fix boostrap bug
NathanMalenge Apr 20, 2026
9c8622f
loading default
NathanMalenge Apr 20, 2026
9971b88
add dependency to osPltforms in UnifiedFFi instead of FileSystem
NathanMalenge Apr 20, 2026
329741a
trying to fix dependency issue
NathanMalenge Apr 20, 2026
62c4618
add dependency
NathanMalenge Apr 20, 2026
ed58063
Merge branch 'Pharo14' of github.com:pharo-project/pharo into FileSystem
NathanMalenge Apr 20, 2026
6a71db3
change package of the method because there was a cycling dependency
NathanMalenge Apr 20, 2026
19191c3
moving these methods to avoid circular dependencies
NathanMalenge Apr 20, 2026
1c2834b
changing package again to avoid dependency
NathanMalenge Apr 20, 2026
179653d
Merge branch 'Pharo14' of github.com:pharo-project/pharo into FileSystem
NathanMalenge Apr 20, 2026
d4a5380
add missing dependency
NathanMalenge Apr 20, 2026
1fcd889
changed the package of the method and now loading core instead of min…
NathanMalenge Apr 20, 2026
5276c39
loading baselineOfThreadedFFI to add dependency
NathanMalenge Apr 20, 2026
ccb5f54
Merge branch 'Pharo14' of github.com:pharo-project/pharo into FileSystem
NathanMalenge Apr 20, 2026
f89e78a
delete ref to threadedffi
NathanMalenge Apr 21, 2026
e39252f
Merge branch 'Pharo14' of github.com:pharo-project/pharo into FileSystem
NathanMalenge Apr 21, 2026
7ce1e02
Merge branch 'Pharo14' into FileSystem
NathanMalenge Apr 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ def bootstrapImage(){
isoTesters['Zinc-Character-Encoding'] = { defineIsoTestStage("Zinc-Character-Encoding", "ZincCharacterEncoding", "\'Zinc-Character-Encoding-Tests\'") }
isoTesters['System-SessionManager'] = { defineIsoTestStage("System-SessionManager", "SystemSessionManager", "\'System-SessionManager-Tests\'") }
isoTesters['System-Platforms'] = { defineIsoTestStage("System-Platforms", "SystemPlatforms", "\'System-Platforms-Tests\'") }
isoTesters['FileSystem'] = { defineIsoTestStage("FileSystem", "FileSystem", "\'FileSystem-Core-Tests\' \'FileSystem-Disk-Tests\' \'FileSystem-Tests-Attributes\'") }
isoTesters['Shift-ClassBuilder'] = { defineIsoTestStage("Shift-ClassBuilder", "Shift", "\'Shift-ClassBuilder-Tests\'") }
parallel isoTesters

Expand Down
13 changes: 9 additions & 4 deletions src/BaselineOfFileSystem/BaselineOfFileSystem.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,22 @@ BaselineOfFileSystem >> baseline: spec [
<baseline>
spec for: #common do: [
spec
baseline: 'UnifiedFFI' with: [ spec className: 'BaselineOfUnifiedFFI';
repository: (self packageRepositoryURLForSpec: spec);
loads: #('minimal')];

package: 'FFI-Kernel';
package: 'FileSystem-Path';
package: 'FileSystem-Core';
package: 'FileSystem-Disk';
package: 'FileSystem-Disk' ;
package: 'FileSystem-Memory';
package: 'System-Sources-Files';

package: 'FileSystem-Core-Tests';
package: 'FileSystem-Disk-Tests';
package: 'FileSystem-Core-Tests' with: [ spec requires: #('FileSystem-Core' 'FileSystem-Memory' 'UnifiedFFI') ];
package: 'FileSystem-Disk-Tests' ;
package: 'FileSystem-Tests-Attributes'.

spec
group: 'Core' with: {'FFI-Kernel'. 'FileSystem-Path'. 'FileSystem-Core'. 'FileSystem-Disk'. 'System-Sources-Files'};
group: 'Core' with: { 'FFI-Kernel'. 'FileSystem-Path'. 'FileSystem-Core'. 'FileSystem-Disk'. 'FileSystem-Memory'. 'System-Sources-Files'};
group: 'Tests' with: { 'FileSystem-Core-Tests'. 'FileSystem-Disk-Tests'. 'FileSystem-Tests-Attributes' } ]
]
7 changes: 4 additions & 3 deletions src/BaselineOfUnifiedFFI/BaselineOfUnifiedFFI.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ BaselineOfUnifiedFFI >> baseline: spec [
spec for: #common do: [
spec
"unified ffi"
package: 'UnifiedFFI';
package: 'System-Platforms';
package: 'System-OSEnvironments';
package: 'UnifiedFFI' with: [ spec requires: #('System-Platforms' 'System-OSEnvironments') ];
package: 'UnifiedFFI-Tests' with: [ spec requires: #('UnifiedFFI') ];
package: 'System-OSEnvironments' with: [ spec requires: #('UnifiedFFI') ];
package: 'System-OSEnvironments-Tests' with: [ spec requires: #('System-OSEnvironments') ].

spec
group: 'default' with: #('core');
group: 'minimal' with: #('UnifiedFFI' 'System-OSEnvironments');
group: 'minimal' with: #('UnifiedFFI' 'System-OSEnvironments' 'System-Platforms');
group: 'core' with: #('minimal' 'UnifiedFFI-Tests' 'System-OSEnvironments-Tests') ]
]
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
Extension { #name : 'StringTest' }
Class {
#name : 'FileStringTest',
#superclass : 'TestCase',
#category : 'FileSystem-Core-Tests',
#package : 'FileSystem-Core-Tests'
}

{ #category : '*FileSystem-Core-Tests' }
StringTest >> testAsFileLocatorOrReferenceReturnsALocatorWhenStringRefersToAKnownOrigin [
{ #category : 'tests' }
FileStringTest >> testAsFileLocatorOrReferenceReturnsALocatorWhenStringRefersToAKnownOrigin [
| pathString locator |
pathString := (FileLocator home / 'foo') fullName.

Expand All @@ -15,8 +20,8 @@ StringTest >> testAsFileLocatorOrReferenceReturnsALocatorWhenStringRefersToAKnow
equals: pathString
]

{ #category : '*FileSystem-Core-Tests' }
StringTest >> testAsFileLocatorOrReferenceReturnsAReferenceWhenStringDoesNotReferToAKnownOrigin [
{ #category : 'tests' }
FileStringTest >> testAsFileLocatorOrReferenceReturnsAReferenceWhenStringDoesNotReferToAKnownOrigin [
| fileRef result |
fileRef := '/foo' asFileReference.

Expand Down
12 changes: 12 additions & 0 deletions src/FileSystem-Core/FileReference.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ FileReference class >> fileSystem: aFilesystem path: aPath [
^ self new setFileSystem: aFilesystem path: aPath
]

{ #category : 'instance creation' }
FileReference class >> newTempFilePrefix: prefix suffix: suffix [
| tmpDir random fileName |

tmpDir := FileLocator temp asFileReference.
[
random := UUID new asInteger asString.
fileName := prefix , random , suffix.
(tmpDir / fileName) exists ] whileTrue.
^ tmpDir / fileName
]

{ #category : 'navigating' }
FileReference >> , extension [
^ self withPath: self path, extension
Expand Down
1 change: 1 addition & 0 deletions src/FileSystem-Core/FileSystem.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Class {
#package : 'FileSystem-Core',
#tag : 'Public'
}

{ #category : 'system startup' }
FileSystem class >> startUp: aBoolean [
"This is only here to deal with migration from older versions of
Expand Down
13 changes: 0 additions & 13 deletions src/MonticelloRemoteRepositories/FileReference.extension.st

This file was deleted.

33 changes: 0 additions & 33 deletions src/System-OSEnvironments/AbstractUnixPlatform.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,6 @@ AbstractUnixPlatform >> basicGetEnvRaw: encodedVariableName [
self primitiveFail
]

{ #category : '*System-OSEnvironments' }
AbstractUnixPlatform >> basicGetEnvRawViaFFI: arg1 [

"PRIVATE: This FFI call works on Strings, while the correct way to manage encodings is with raw data.
Use me through #basicGetEnvRaw: to correctly marshall data."

"This method calls the Standard C Library getenv() function.
The name of the argument (arg1) should fit decompiled version."

^ self ffiCall: #( String getenv (String arg1) ) module: LibC
]

{ #category : '*System-OSEnvironments' }
AbstractUnixPlatform >> environ [
"Return the address of the array holding the environment variables"

^ FFIExternalArray fromPointer: (ExternalAddress loadSymbol: 'environ' from: LibC) type: String
]

{ #category : '*System-OSEnvironments' }
AbstractUnixPlatform >> environAt: index [

Expand Down Expand Up @@ -145,17 +126,3 @@ AbstractUnixPlatform >> removeKey: key encoded: anEncoding [

^ self rawRemoveKey: (key encodeWith: anEncoding)
]

{ #category : '*System-OSEnvironments' }
AbstractUnixPlatform >> setEnv: nameString value: valueString [
"int setenv(const char *name, const char *value, int overwrite);"

^ self ffiCall: #( int setenv #( String nameString #, String valueString #, int 1 ) ) module: LibC
]

{ #category : '*System-OSEnvironments' }
AbstractUnixPlatform >> unsetEnv: string [
"This method calls the the platform specific unset environment routine"

^ self ffiCall: #(int unsetenv #(String string)) module: LibC
]
34 changes: 34 additions & 0 deletions src/UnifiedFFI/AbstractUnixPlatform.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Extension { #name : 'AbstractUnixPlatform' }

{ #category : '*UnifiedFFI' }
AbstractUnixPlatform >> basicGetEnvRawViaFFI: arg1 [

"PRIVATE: This FFI call works on Strings, while the correct way to manage encodings is with raw data.
Use me through #basicGetEnvRaw: to correctly marshall data."

"This method calls the Standard C Library getenv() function.
The name of the argument (arg1) should fit decompiled version."

^ self ffiCall: #( String getenv (String arg1) ) module: LibC
]

{ #category : '*UnifiedFFI' }
AbstractUnixPlatform >> environ [
"Return the address of the array holding the environment variables"

^ FFIExternalArray fromPointer: (ExternalAddress loadSymbol: 'environ' from: LibC) type: String
]

{ #category : '*UnifiedFFI' }
AbstractUnixPlatform >> setEnv: nameString value: valueString [
"int setenv(const char *name, const char *value, int overwrite);"

^ self ffiCall: #( int setenv #( String nameString #, String valueString #, int 1 ) ) module: LibC
]

{ #category : '*UnifiedFFI' }
AbstractUnixPlatform >> unsetEnv: string [
"This method calls the the platform specific unset environment routine"

^ self ffiCall: #(int unsetenv #(String string)) module: LibC
]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : 'Win32WideString' }

{ #category : '*System-OSEnvironments' }
{ #category : '*UnifiedFFI' }
Win32WideString class >> asExternalTypeOn: generator [
^ FFIExternalObjectType objectClass: self
]