Giter Club home page Giter Club logo

Comments (7)

norayr avatar norayr commented on September 14, 2024

@dcwbrown i can do somithing like that for unix, but how does mkdir work for windows? we need to keep Platformunix.Mod and Platformwindows.Mod synced.

from voc.

dcwbrown avatar dcwbrown commented on September 14, 2024

It's called 'CreateDirectory' on Windows. But my hunch is that we don't want to start down the path of providing a general system API in Platform beyond what is needed for Vishap itself.

Windows and Linux do have a great deal in common with regard to filesystem concepts, but there are also some really annoying gotchas such as case sensitivity and which characters are valid in filenames.

Here's a little detail for example: where Linux has a single current directory, Windows has multiple drives and keeps a separate current directory for each drive, as well as a current drive.

Also bear in mind that Vishap Oberon file handling, such as in Files.Mod, is designed to mimic the Oberon system and is somewhat different to the Linux/Windows way of doing things. See https://github.com/vishaps/voc/blob/master/doc/Files.md.

I suggest that it if we were to add functionality to Platform beyond what is needed for Vishap itself, then it would not make sense to single out mkdir as the only system function to add.

It would also seem necessary to add APIs for accessing file attributes, file security, manipulating the current directory, walking directories, dealing with symbolic links, handling mount points, etc..

And so if we do we are committing to a lot of work, and to coming up with a consistant behaviour that works the same across linux and windows and yet does not hide linux and windows specific functionality.

While I have been able to do so with Vishap's needs as the known customer, I don't believe this is possible in the general case.

I think @PizzaPablo666's implementation is a great way to go. It isn't complicated, and it leaves everything under @PizzaPablo666's control.

Any user of Vishap is free to use this approach to access those parts of OS functionality that their particular situation needs.

All the best -- Dave

from voc.

svorkoetter avatar svorkoetter commented on September 14, 2024

from voc.

antranigv avatar antranigv commented on September 14, 2024

This has been open for a long time now, we need to merge the basics into the Platform or Files.

There are some minor differences between Unix systems, and if we want to expose the stat info to the user, we'd need to implement it for Linux, FreeBSD, OpenBSD, NetBSD, AIX, illumos, etc.

@norayr any thoughts?

from voc.

dcwbrown avatar dcwbrown commented on September 14, 2024

I stand by my earlier analysis. to simplify: a platform-portable filesystem is a nice aspiration but not a practical goal.

from voc.

antranigv avatar antranigv commented on September 14, 2024

After spending couple of hours thinking about this, I agree. We should create a module named Filesystem, which has functions such as New, Rename, ChangeOwner, ChangeMod, etc.

I will add a separate module for this, and work on it overtime for the next voc version, keeping Platform as is.

@norayr thoughts?

from voc.

norayr avatar norayr commented on September 14, 2024

since

  • we have a package manager,
  • your module is unix only

i think it's better to just have it in your github, and add it to our ports system.

i myself think of removing ooc or ulm set of libraries to different repositories. vipack is easy to use to add dependencies to the project. just one json file, and one command to build.

from voc.

Related Issues (20)

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.