You can also use String>>asFileReference:
relative path:
'./foo.txt' asFileReference
absolute path:
'/foo.txt' asFileReference
Cheers,
Doru
> On Apr 18, 2016, at 11:01 AM, Cyril Ferlicot Delbecque
> wrote:
>
>
>
> On 18/04/2016 10:56, Valentin Ryckewaert wrote:
>> I'm on Li
An interresting fact is that exists answer true to
(FileSystem root / 'aPath/cat.jpg') exists
2016-04-18 11:25 GMT+02:00 Nicolai Hess :
>
>
> 2016-04-18 11:08 GMT+02:00 Sven Van Caekenberghe :
>
>> Think of it as follows: Pharo is cross platform, forward slash is used on
>> *nix and Mac OS, but n
2016-04-18 11:08 GMT+02:00 Sven Van Caekenberghe :
> Think of it as follows: Pharo is cross platform, forward slash is used on
> *nix and Mac OS, but not Windows where it is backslash. FileReference is an
> object oriented API that abstracts over that. Asking for an interpretation
> of the sub par
Ok thanks everyone for your answers I got it ! :)
2016-04-18 11:08 GMT+02:00 Sven Van Caekenberghe :
> Think of it as follows: Pharo is cross platform, forward slash is used on
> *nix and Mac OS, but not Windows where it is backslash. FileReference is an
> object oriented API that abstracts over
Think of it as follows: Pharo is cross platform, forward slash is used on *nix
and Mac OS, but not Windows where it is backslash. FileReference is an object
oriented API that abstracts over that. Asking for an interpretation of the sub
parts is a step too far (even if it would be handy).
> On 1
On 18/04/2016 10:56, Valentin Ryckewaert wrote:
> I'm on Linux
>
> Is it wanted that root / 'a' / 'foo.txt' is different than root /
> '.foo.txt' ? I find that strange
>
If you want a relative path from the image location you can use
`FileSystem workingDirectory / 'foo.txt'`
--
Cyril Ferlico
I'm on Linux
Is it wanted that root / 'a' / 'foo.txt' is different than root /
'.foo.txt' ? I find that strange
2016-04-18 10:52 GMT+02:00 Cyril Ferlicot Delbecque <
cyril.ferli...@gmail.com>:
>
>
> On 18/04/2016 10:44, Valentin Ryckewaert wrote:
> > Using your method (A string asFileReference)
On 18/04/2016 10:44, Valentin Ryckewaert wrote:
> Using your method (A string asFileReference) it works thanks !
>
> But if you use FileSystem root / I get the "same" object but it's
> still not working. Did I make a mistake somewhere?
>
Hi,
Did you try `FileSystem root / 'a' / 'Path' /
Hi,
I think the problem is using 'aPath/cat.jpg' as a single string (= as a
single component of the path).
This:
path1 := FileSystem root / 'a/b/c.txt'.
is different to:
path2 := FileSystem root / 'a' / 'b' / 'c.txt'.
Compare the results when I ask for the parent directory:
path1 p
Using your method (A string asFileReference) it works thanks !
But if you use FileSystem root / I get the "same" object but it's
still not working. Did I make a mistake somewhere?
2016-04-18 10:38 GMT+02:00 Sven Van Caekenberghe :
> Hi Valentin,
>
> > On 18 Apr 2016, at 10:31, Valentin Ryck
Hi Valentin,
> On 18 Apr 2016, at 10:31, Valentin Ryckewaert
> 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 plea
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'
V
12 matches
Mail list logo