Hi Valentin,
Seems to work OK for me (Pharo 5 on Mac OS)
> On 18 Apr 2016, at 10:31, Valentin Ryckewaert <valentin.ryckewaert@gmail.com> wrote:
>
> Hi everyone,
>
> I'm trying to rename files with this code but it doesn't work, pharo is saying me "PrimitiveFailed"
> I tried lots of things and I'm not finding how I can rename this file, someone has an idea please?
>
> | myFile |
> myFile := FileSystem root / 'aPath/cat.jpg'.
> myFile renameTo:'cats.jpg'
>
> Valentin
'/tmp/foo.txt' asFileReference writeStreamDo: [ :out | out << 'Pharo' ].
'/tmp/foo.txt' asFileReference exists.
'/tmp/foo.txt' asFileReference renameTo: 'bar.txt'.
'/tmp/foo.txt' asFileReference exists.
'/tmp/bar.txt' asFileReference exists.
'/tmp/bar.txt' asFileReference contents.
Maybe a permission problem ?
Sven