Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Forum Connectivity Upgrade Read more... ×

Search the Community

Showing results for tags 'filesystem'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • OpenComputers
    • Announcements
    • Feedback
    • IRC
  • Code Central
    • Support
    • Showcase
    • Tutorials
  • Addons & More
    • Addons Mods
    • Architectures
    • OpenEngineering Task Force
  • General
    • Lounge
    • Forum Games
    • Showcase
    • Servers
  • Archives
    • Public Archives

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Minecraft


GitHub


IRC


Location


Interests

Found 3 results

  1. I just finished the first version of bundle - a rc application which virtually merges multiple filesystems into a big one. You can use it whenever a RAID full of tier 3 HDD isn't enough for your needs. On the picture above, for example, you can see 10 RAIDs with 30 tier 3 HDDs which yield a virtual HDD that can store over 200MB of data. You can also use filesystems of different size and create files bigger than any of the used filesystems since bundle is capable of storing a file in multiple HDDs. If you encounter any bug, please run it in the development enviroment first which is Open Computer 1.7.2.1166 on Minecraft 1.7.10 in Lua 5.2, although I also tested it in Lua 5.3. If the bug persists, please report it on my github repository. How to use it? First you can download it from pastebin (id: TmeSNidd) or my github repository, altough it hasn't been registred yet, and install the file at the location for rc applications (/etc/rc.d/bundle.lua). Before using it you should configure the top section of the script. Bundle doesn't work correctly if its configuration do not match your (real) OS, OC configuration or computer performance. Then need to add some filesystems by executing rc bundle add [address] in the shell. Of course it works better if you replace [address] by the address of the desired filesystem. Doing so wipes the added filesystem. However, note that Bundle never takes filesystems automatically. Then you should allow bundle to run in background by executing rc bundle enable Just reboot the computer and you should see it when executing df Note that the label of the first added filesystem and the filesystem provided by Bundle are always equal since that's the way how bundle stores it. You can also see the added filesystems by typing (and ideally executing) rc bundle list You can also remove added filesystems by rc bundle remove [true] Currently, this just removes the last added filesystem, however. If the removal causes the lose of data this fails except you set [true] to true to remove the filesystem forcefully. Usage notes Please don't install the OS on Bundle. Bundle requires some functions of OpenOS but if you install the OS on Bundle, the operating system needs bundle to be launched. So avoid this catch-22 by don't installing the OS on Bundle. You can either install it on a seperate filesystem or use the OpenOs floppy disk. Bundle uses a virtual copy of the file structure. So, when using complex file structure always provide a sufficient amont of RAM. On the other hand, this means that fs.exists(), fs.isDirectory() and fs.list() don't have to perform any "hardware" operation, thus being quicker. Known bugs Seek operations that set the read/writing position to value that is bigger than the size of the file cause the file the become bigger than its actual physical size. This is also the case on any "hardware" filesystem components but with bundle it might cause internal errors. That is it for now, have fun using Bundle.
  2. LordNocturnus

    deleting file with a running program

    Hello i am trying to download a file use it and delete it again to make space on the hard drive for the next file but i does not delete the file somehow: local c = require("component") local computer = require("computer") local internet = require("internet") local fs = require("filesystem") local p = c.printer3d args = {...} link = "https://raw.githubusercontent.com/LordNocturnus/sf-" folder = "/master/" imax = 0 local TIMEOUT = 4 -- in seconds for i = 0, imax do local url = link .. i .. folder .. "list.txt" local status, connection = pcall(internet.request, url) if not status or not connection then print("Download of " .. url .. " failed.") else local startTime = computer.uptime() while true do local response, isFinished = pcall(connection.finishConnect) if response and isFinished then local f = io.open("list.txt", "wb") -- print(status) -- print(response) print(isFinished) -- print(connection) for chunk in connection do f:write(chunk) end f:close() break elseif computer.uptime() - startTime > TIMEOUT then print("Request to " .. url .. " timed out") os.exit() else os.sleep(0.25) end end end for line in io.lines('list.txt') do print(line) local url = link .. i .. folder .. line .. ".mb3d" local status, connection = pcall(internet.request, url) if not status or not connection then print("Download of " .. url .. " failed.") else local startTime = computer.uptime() while true do local response, isFinished = pcall(connection.finishConnect) if response and isFinished then local f = io.open(line .. ".mb3d", "wb") -- print(status) -- print(response) print(isFinished) -- print(connection) for chunk in connection do f:write(chunk) end f:close() break elseif computer.uptime() - startTime > TIMEOUT then print("Request to " .. url .. " timed out") os.exit() else os.sleep(0.25) end end end cords = {} for i in string.gmatch(line,"([^-]+)") do cords[#cords+1] = tonumber(i) end print(cords[1],cords[2],cords[3]) -- printer(cords[1],cords[2],cords[3]) -- do something with the file file = string.format("%d-%d-%d.mb3d", cords[1],cords[2],cords[3]) fs.remove(file) end end
  3. I am attempting to write an OS from scratch and I have come up with a couple questions that somebody can hopefully clarify for me as I cannot continue without the following knowledge. 1).Since a critical function like require is unavailable, can someone point me to general steps needed to write a custom require function. 2).What would be needed to implement a custom filesystem without any libraries from openos. Any help is greatly appreciated
×

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.