2.7: Chapter Summary

Deep into Pharo · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-SA 3.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    2.7: Chapter Summary

    FileSystem is a powerful and elegant library to manipulate files. It is a fundamental part of Pharo. The Pharo community will continue to extend and build it. The class FileReference is the most important entry point to the framework.

    • FileSystem offers factory class methods to build file systems on hard disk and in memory.
    • FileReference is a central class in the framework which represents a file or a folder. A file reference offers methods to operate on a file and navigate within a file system.
    • Sending the message asFileReference to a string character returns its corresponding file reference (e.g., '/tmp' asFileReference)
    • Creating a file and writing in it is as simple as: (FileSystem disk workingDirectory / 'foo.txt') writeStreamDo: [ :stream | stream nextPutAll: 'Hello World' ].
    • FileLocator is a late binding reference, useful when the file location in a hard disk depends on the running context.
    • FileSystemDirectoryEntry offers a large set of low level detail for a given file.

    This page titled 2.7: Chapter Summary was last modified on Mon, 26 Jul 2021 15:16:41 GMT and is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by Alexandre Bergel, Damien Cassou, Stéphane Ducasse, Jannik Laval (Square Bracket Associates) via source content that was edited to the style and standards of the LibreTexts platform.