Skip to content

Commit

Permalink
Cleanup newlines and blanks in "FileSystem" packages
Browse files Browse the repository at this point in the history
Fix #10452
  • Loading branch information
astares committed Nov 25, 2021
1 parent a6b1df1 commit 6d908a9
Show file tree
Hide file tree
Showing 44 changed files with 91 additions and 255 deletions.
34 changes: 15 additions & 19 deletions src/FileSystem-Core/AbstractFileReference.class.st
Expand Up @@ -36,7 +36,7 @@ AbstractFileReference >> absolutePath [

{ #category : #accessing }
AbstractFileReference >> accessTime [
^ self resolve accessTime
^ self resolve accessTime
]

{ #category : #enumerating }
Expand All @@ -51,7 +51,6 @@ AbstractFileReference >> allChildrenMatching: aPattern [
"Return all the files and folders recursively nested in the receiver and matching the pattern, aPattern"

^ self allChildren select: [ :each | aPattern match: each basename ]

]

{ #category : #enumerating }
Expand All @@ -68,7 +67,6 @@ AbstractFileReference >> allDirectoriesMatching: aPattern [
breadthFirst: self resolve
select: [:entry | entry isDirectory and: [ aPattern match: entry basename ] ])
collect: [ :each | each reference ]

]

{ #category : #enumerating }
Expand All @@ -90,14 +88,14 @@ AbstractFileReference >> asAbsolute [

{ #category : #converting }
AbstractFileReference >> asFileReference [
self subclassResponsibility
self subclassResponsibility
]

{ #category : #converting }
AbstractFileReference >> asPath [
"Answer the receiver's path"

self subclassResponsibility
self subclassResponsibility
]

{ #category : #delegated }
Expand Down Expand Up @@ -125,7 +123,7 @@ AbstractFileReference >> basename [
{ #category : #accessing }
AbstractFileReference >> basenameWithIndicator [
"Returns the basename with the indicator appended, i.e. /foo/gloops.taz basenameWithIndicator is 'gloops.taz', whereras /foo basenameWithIndicator is 'foo/'"
^ self basename, self indicator
^ self basename, self indicator
]

{ #category : #accessing }
Expand Down Expand Up @@ -203,7 +201,7 @@ AbstractFileReference >> canonicalize [

{ #category : #accessing }
AbstractFileReference >> changeTime [
^ self resolve changeTime
^ self resolve changeTime
]

{ #category : #private }
Expand Down Expand Up @@ -248,7 +246,7 @@ AbstractFileReference >> childrenMatching: patterns [
^ self
childGeneratorBlock: [:reference : aBlock|
reference fileSystem childNamesAt: reference path do: aBlock ]
matching: patterns
matching: patterns
]

{ #category : #comparing }
Expand Down Expand Up @@ -297,12 +295,11 @@ AbstractFileReference >> createFile [
"Create if necessary a file for the receiver. If the parent does not exist return an exception"
self parent exists ifFalse:[DirectoryDoesNotExist signalWith: self parent path].
self writeStream close.

]

{ #category : #accessing }
AbstractFileReference >> creationTime [
^ self resolve creationTime
^ self resolve creationTime
]

{ #category : #operations }
Expand Down Expand Up @@ -357,7 +354,7 @@ AbstractFileReference >> directoriesMatching: patterns [
^ self
childGeneratorBlock: [:reference : aBlock|
reference fileSystem directoryNamesAt: reference path do: aBlock ]
matching: patterns
matching: patterns
]

{ #category : #enumerating }
Expand All @@ -376,7 +373,6 @@ AbstractFileReference >> ensureCreateFile [
"Create if necessary a file for the receiver. If the parent does not exist creates it"
self parent ensureCreateDirectory.
self writeStream close.

]

{ #category : #operations }
Expand Down Expand Up @@ -474,7 +470,7 @@ AbstractFileReference >> filesMatching: patterns [
^ self
childGeneratorBlock: [:reference : aBlock|
reference fileSystem fileNamesAt: reference path do: aBlock ]
matching: patterns
matching: patterns
]

{ #category : #delegated }
Expand All @@ -486,7 +482,7 @@ AbstractFileReference >> fullName [
{ #category : #accessing }
AbstractFileReference >> fullNameWithIndicator [
"Returns the basename with the indicator appended, i.e. /foo/gloops.taz basenameWithIndicator is '/foo/gloops.taz', whereras /foo basenameWithIndicator is '/foo/'"
^ self fullName, self indicator
^ self fullName, self indicator
]

{ #category : #accessing }
Expand Down Expand Up @@ -587,12 +583,12 @@ AbstractFileReference >> inode [

{ #category : #testing }
AbstractFileReference >> isAbsolute [
self subclassResponsibility
self subclassResponsibility
]

{ #category : #accessing }
AbstractFileReference >> isBlock [
^ self resolve isBlock
^ self resolve isBlock
]

{ #category : #accessing }
Expand Down Expand Up @@ -638,7 +634,7 @@ AbstractFileReference >> isReadable [

{ #category : #testing }
AbstractFileReference >> isRelative [
self subclassResponsibility
self subclassResponsibility
]

{ #category : #testing }
Expand Down Expand Up @@ -673,7 +669,7 @@ AbstractFileReference >> makeRelative: anObject [

{ #category : #accessing }
AbstractFileReference >> modificationTime [
^ self resolve modificationTime
^ self resolve modificationTime
]

{ #category : #operations }
Expand Down Expand Up @@ -809,7 +805,7 @@ AbstractFileReference >> renameTo: newBasename [

{ #category : #navigating }
AbstractFileReference >> resolve [
^ self subclassResponsibility
^ self subclassResponsibility
]

{ #category : #navigating }
Expand Down
4 changes: 0 additions & 4 deletions src/FileSystem-Core/DiskDirectoryEntry.class.st
Expand Up @@ -123,15 +123,13 @@ DiskDirectoryEntry >> changeTime [
On platforms that don't support change time, use the modification time"

^DateAndTime fromInternalTime: ((self statAttributes at: 11) ifNil: [ self statAttributes at: 12 ])

]

{ #category : #accessing }
DiskDirectoryEntry >> changeUnixTime [
"Answer the receiver's change time in Unix time_t format"

^self changeTime asUnixTime

]

{ #category : #accessing }
Expand Down Expand Up @@ -171,15 +169,13 @@ DiskDirectoryEntry >> getAllAttributes [
allAttributes := self primitives fileAttributes: self pathString mask: self allAttributeMask.
statAttributes := allAttributes at: 1.
accessAttributes := allAttributes at: 2.

]

{ #category : #'cache management' }
DiskDirectoryEntry >> getStatAttributes [
"Store the receivers stat() attributes for future reference"

^statAttributes := self primitives fileAttributes: self pathString mask: self statAttributeMask.

]

{ #category : #accessing }
Expand Down

0 comments on commit 6d908a9

Please sign in to comment.