|
Perhaps we should add a UNC class?
From slack:
Ilshad Khabibullin [14:05]
Hi there! Are UNC `\\server-name\shared-folder-name` in Windows not
supposed to be working with FileReference?
Ilshad Khabibullin [14:22]
looks like it works in VW, for example. I wonder if we can use
`\\WIN-SO4HTUV4HAL\TestShared\newfile.txt' asFileReference
ensureCreateFile` but it doesn’t work. It creates reference `File @
\WIN-SO4HTUV4HAL\TestShared\newfile.txt` instead of proper one. Have
anyone advice how to manage working UNC?
Ilshad Khabibullin [14:36]
@maxleske: I think it should create FileReference to this shared (via
network) folder.
Max Leske [14:37]
(BTW: UNC is implemented in the FilePlugin of the VM)
Ilshad Khabibullin [14:37]
but it creates, I think, FileReference to “C:\WIN…..` by default, it
gets “C:\|
Max Leske [14:38]
So has the file not been created on the share?
Ilshad Khabibullin [14:38]
@maxleske: wow thank you! trying..
[14:38]
ah.. it’s already..
Stephan Eggermont [14:38]
asFileReference on String might not do the right thing
[14:41]
@maxleske: what do you mean by FilePlugin? Does it mean that Windows
distribution of Pharo 4 has it?
Max Leske [14:43]
The virtual machine has it. You shouldn’t need to worry about it. UNC is
provided transparently by the C implementation. You won’t find any
references to UNC in the Smalltalk code
Stephan Eggermont [14:43]
String asFileReference is ^ FileSystem disk referenceTo: self
Ilshad Khabibullin [14:44]
so it is supposed to be working anyway
Ilshad Khabibullin [15:52]
played with ZnUrl and finally managed it:
`'file://WIN-SO4HTUV4HAL/c:/TestShared' asUrl asFileReference children.`
it works!!
|