Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

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 2 results

  1. I just finished the first version of bundle - a rc application which virtually merges multiple filesystems into a bigger 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 on multiple HDDs. If you encounter any bug, please report it on my github repository. Also check out the wiki page. How to use it First of all you can download it from pastebin (id: TmeSNidd) or my github repository and install the file in the directory for rc script (/etc/rc.d/bundle.lua). Before using it you should configure the constants at the top of the script in accordance with their descriptions. Otherwise Bundle might work incorrectly. Then you need to add some filesystems by executing rc bundle add [address] in the shell. Please replace [address] by the address of the desired filesystem. Doing so wipes the added filesystem. However, Bundle never incorporates filesystems automatically. Next you should allow bundle to run in background by executing rc bundle enable Just reboot the computer and it should be listed by 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 view the added filesystems by executing rc bundle list You can also remove added filesystems by rc bundle remove [forcefully] Currently, this just removes the last added filesystem, however. If the removal causes the lose of data this fails except you set [forcefully]. Usage notes Don't install the OS on a Bundle filesystem since Bundle requires some functions of OpenOS. Bundle uses a virtual copy of the file structure. On the one hand this makes "hardware" operations faster, on the other hand it might lead to errors when running out of memory. Bundle works with Lua 5.2 as well as Lua 5.3. Known bugs Seek operations that set the current position to a 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 filesystem components of Open Computers but with bundle it might cause internal errors. That is it for now, have fun using Bundle.
  2. 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
×
×
  • Create New...

Important Information

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