Thanks for the tip Sven. -----Mensagem original----- De: Pharo-dev [mailto:[email protected]] Em nome de Sven Van Caekenberghe Enviada em: domingo, 30 de abril de 2017 17:14 Para: Pharo Development List <[email protected]> Assunto: Re: [Pharo-dev] RES: RES: Problem with FileSystem in WIndows
I have a feeling that you are working on the wrong level, consider: file := FileReference newTempFilePrefix: 'data' suffix: '.txt'. file writeStreamDo: [ :out | out << 'Casimiro de Almeida Barreto' ]. file contents. file ensureDelete. file exists. The #newTempFilePrefix:suffix: method uses 'FileLocator temp' as target directory, which will be different on different platforms. The trick is to use these FileLocator locations, try 'FileLocator supportedOrigins', to have an abstract, cross platform starting point (except for the Windows drives, obviously). Then you construct directories using messages. Remember, the whole image, file browser, file dialogs, they all work cross platform, so you can do so too. --- Este email foi escaneado pelo Avast antivĂrus. https://www.avast.com/antivirus
