Better is this :
GsHostProcess class>mskCheckFileEncoding: source
" ^<String> Returns the mime-encoding of a single file
Example: GsHostProcess mskCheckFileEncoding: '/home/mf/Schreibtisch/217055.csv'
"
| output aWriteStream readStream |
aWriteStream := WriteStream on: String new.
aWriteStream
nextPutAll: 'file --mime-encoding ' ;
nextPut: $' ;
nextPutAll: source ;
nextPut: $'.
output := System performOnServer: aWriteStream contents.
readStream := ReadStream on: output.
readStream throughAll: source ; throughAll: ':'.
^readStream upToEnd trimBlanks trimSeparators
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass