Git Product home page Git Product logo

fileman's Introduction

FileMan

Overview

FileMan is a thin wrapper for various Smalltalk file libraries. It provides simple, portable interfaces for manipulating files and directories.

Currently, FileMan can wrap those different Smalltalk file libraries.

  • FileDirectory (Squeak, Cuis)
  • FileSystem (Pharo)
  • Filename (VisualWorks)

This repository is mainly for Pharo and Squeak.

Cuis version

Cuis now includes FileMan as a default file library. Repository for Cuis version is kept for historical reasons.

VW version

VW version is available on Public StORE repository. Please load FileMan(Bundle) from StORE.

Installation

Pharo & Squeak

Metacello new
  baseline: 'FileMan';
  repository: 'github://mumez/FileMan/repository';
  load.

Older Squeak (before version 5.3)

Installer squeaksource
    project: 'MetacelloRepository';
    install: 'ConfigurationOfFileMan'. 
(Smalltalk at: #ConfigurationOfFileMan) perform: #load.

Example code

"Before (legacy Squeak)"
subDir := FileDirectory default directoryNamed: 'subDir'.
subDir assureExistence.
[str := subDir newFileNamed: 'file1'.
str nextPutAll: 'Hello!']
ensure: [str close].

"After installation of FileMan"
'./subDir' asDirectoryEntry at: 'file2' put: 'Hello!'

By installing FileMan, you can write simple, portable file manipulation code in different Smalltalk dialects/file libraries.

fileman's People

Contributors

mumez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

hhzl ysei

fileman's Issues

Pharo 4.0 -- Problem with FmFileIOAccessor default createDirectory: dirString.

pharo4 0_fileman_tests_screenshot from 2015-08-28 11 48 44

pharo4 0_fileman_testdirectoryexists_screenshot from 2015-08-28 11 49 50

        FmFileIOAccessor default createDirectory: dirString.

calls

       createDirectory: fullPathName
^self primCreateDirectory: fullPathName asVmPathName

and this causes an error

      primCreateDirectory: fullPath
"Create a directory named by the given path. Fail if the path is bad or if a file or directory by that name already exists."

<primitive: 'primitiveDirectoryCreate' module: 'FilePlugin'>
self primitiveFailed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.