[Pkg] Rio: File-Base-kph.14.mcz
squeak-dev-noreply at lists.squeakfoundation.org
squeak-dev-noreply at lists.squeakfoundation.org
Thu Feb 26 14:04:36 UTC 2009
A new version of File-Base was added to project Rio:
http://www.squeaksource.com/Rio/File-Base-kph.14.mcz
==================== Summary ====================
Name: File-Base-kph.14
Author: kph
Time: 26 February 2009, 2:04:31 pm
UUID: 63e34362-040e-11de-a647-000a95edb42a
Ancestors: File-Base-kph.13
= #+ now results in a File as default
= ftp fileSize breaks on asciii files.
So ftp is now explicitly set to binary by default
= fixed full:
=============== Diff against File-Base-kph.13 ===============
Item was added:
+ ----- Method: FileRemoteExecutive>>password: (in category 'as yet unclassified') -----
+ password: secret
+
+ ^ url password ifNil: [ self MCPasswordManager default passwordAt: url asString user: (self user ifNil:[^'squeak']) put: secret ]
+
+
+ !
Item was changed:
----- Method: FileFtpExecutive>>ftpClient (in category 'ftp client') -----
ftpClient
client ifNotNil: [client isConnected ifTrue: [ ^ client ] ].
+ ^ client := self ftpOpenClient binary!
- ^ client := self ftpOpenClient!
Item was changed:
----- Method: File>>+ (in category 'public path') -----
+ ext
+ ^ File executive: executive value: self value, ext asString
- ^ self class newFileFrom: self value, ext asString
!
Item was changed:
----- Method: FileFtpExecutive>>ftpOpenClient (in category 'ftp client') -----
ftpOpenClient
| loginSuccessful what newClient |
newClient := self FTPClient openOnHostNamed: self host.
loginSuccessful := false.
[loginSuccessful]
whileFalse: [
[loginSuccessful := true.
+
newClient loginUser: self user password: self password]
on: LoginFailedException
do: [:ex |
what := UIManager default
chooseFrom: #('enter password' 'give up')
title: 'Would you like to try another password?'.
what = 1 ifFalse: [self error: 'Login failed.'. ^nil]
ifTrue: [ self password: nil ].
loginSuccessful := false]].
home := newClient pwd.
^ newClient!
Item was changed:
----- Method: File>>full: (in category 'public path') -----
full: aPathOrFile
+ ^ self renamingWith: [
+ value := executive importValue: (aPathOrFile asFile linearRelativeTo: executive defaultDirectory) asString.
- ^ self withRenaming: [
- value := executive importPath: (aPathOrFile asFile linearRelativeTo: executive DefaultDirectory) asString.
]
+ !
- !
More information about the Packages
mailing list