Comments (7)
@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.
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.
from voc.
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.
I stand by my earlier analysis. to simplify: a platform-portable filesystem is a nice aspiration but not a practical goal.
from voc.
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.
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)
- Negative array indices are permitted, sometimes produce segmentation fault HOT 1
- err 16 MODULE expected on Ubuntu 24.04 HOT 1
- SET is 64-bit in Component Pascal size model HOT 3
- x11 examples HOT 1
- runtime should kill when assigning to an unallocated pointer (was: returning pointer to a local variable) HOT 21
- uninitialized variable usage warning
- stabs debug format is not supported at least on one aarch64 platform. HOT 2
- pointer to record broken
- warning: implicit declaration of function
- Wrong Position when error occured HOT 2
- update gcc string to consider MODULES environment variable
- MOD issue HOT 21
- Improved C language interface HOT 11
- passing VAR s: POINTER TO ARRAY OF CHAR passes compilation but later doesn't compile in C HOT 2
- libvoc-02.so not found after make full HOT 1
- Files.WriteSet wrong type in SYSTEM.VAL HOT 3
- Make does not properly uninstall: typo in variable name HOT 1
- Error in WITH statement with pointers to related type extended records HOT 7
- Documentation of voc internals HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from voc.