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


Fediverse ID


Location


Interests

Found 13 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. So, I have been trying to find somebody who's implemented a filesystem for the unmanaged drives. I know what you must be thinking, just use the managed drive then, I'm legit doing what a managed drive does. However, for a few projects, I've wanted or needed an unmanaged filesystem. One example, is an expanded raid with minimal overhead. The simplest sort of raid, just glue all the drives together in one long linear addressable space. That parts easy, just check what section the pointer is on, and forward the operations to the proper disk. The issue is, they require that they be unmanaged, otherwise the "glue" doesn't work. Has anybody seen, or maybe is working on, an implementation of a filesystem for unmanaged drives. I searched here and elsewhere, but couldn't find anything. I'm also terrible at understanding filesystems myself, otherwise I would try and implement this. Thanks for any information you can provide me.
  3. I want to make an application that creates a file named "config.txt" and read/write to it but i am hanging on creating the file. Can't find how to create the file. My Project: Github_Project_Line85 I want to save the IP that the user writes in and after rebooting it should stay. (Line 85) I want to make a check system with the config.txt and then load the variable into it. It's using the GUI API from MineOS
  4. 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
  5. 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
  6. DistFS I needed a larger storage capability in one computer to store long-term data captured on a multiplayer server. Since I didn't want to just cheat and make it "outside" of the world, I decided that what I needed was an infinitely-expandable (although admittedly not scalable) storage medium. RAIDs seemed like a perfect approach, but I didn't want to deal with trying to manage a ton of files. My solution was to build a spanned file system that could manage my files for me across multiple RAIDs, synchronize folder structures, and induct new arrays into the spanned volume automatically. The result is DistFS. It comes with a simple installation wizard that can install and configure DistFS for you, and it set up to be easily deployed via a disk. Just pop it in, let the wizard show up, and you're off to the races. DistFS has the following features: Automatically manage RAID drive folder structures Won't induct non-raid file systems into distfs (configurable) Fully compatible with all standard command-line utilities (edit, df, cat, etc.) Makes it all available on a single mount point, /distfs Automatically starts at boot Simple installation / configuration wizard Ease of reconfiguration - just re-insert the install disk Multi-master arrays are supported. Just set a single computer as the array master, and configure the other computers not to be DistFS Upcoming features: Gracefully handling removal of RAID volumes unexpectedly Finer control over which file systems are spanned Management utilities A manual DistFS does not, and will not: Support multiple spanned volumes on one computer Play nice with removable disk drives (floppies, tapes, etc) Support unmanaged drives Allow files to span volumes - all individual files must fit within a single drive in the spanned volume (i.e. no 13MByte files) Feed your ocelot Currently, I don't have a simple "pastebin run xxxx" command for DistFS - I'll try to get one up shortly. To view and download all DistFS files and/or suggest changes, visit the Github repository at https://github.com/sukasa/distfs . I recommend downloading all of the files to a floppy disk; this provides the best user experience when setting up DistFS DistFS has not been tested on a Lua 5.2 Architecture. It may work, but was developed on 5.3
  7. hallo here i am again... i know dum question again! 1. what to use filesystem.open or io.open i know that it is the same but what is the best one 2. and how to pick a new line weren in write mode (what i mean is that how can i like write a thing on line 1 and then on line number 10 or 2 or whatever like in terminal like term.setCursor can i do that in io.open two in write mode) what i wil say is how to write new line or how to do newline i also need to point out that i know there is i seek function but 1 i don't no how to use it and 2 as i can understand do seek only work in read mode i have played opencomputers in a long time and i still don't understand io.open and filesystem.open fully and yes i do know to the wiki and i do reading it some times so plese don't say that................. or write it
  8. Using this program, you can host an array filesystem over a network. Set up is as simple as installing an autorun.lua script on the computer or server that hosts the ServerFS filesystem, and installing a boot script on the clients that will access the ServerFS filesystem. How it works: The "Host", the computer or server hosting the ServerFS fileserver, runs an autorun script which will allocate all non-primary filesystem components to a single virtual "ServerFS" component. It then receives messages over the network and when a message is received relating to the ServerFS the Host will then respond to the sender with a message with data related to the method it was trying to call. A "Client", a computer or server connecting to the ServerFS Host, has a boot script installed which runs at startup and sets up a virtual component which functions like a normal filesystem component. Calling one of the virtual component's methods will cause the Client to send messages to the Host computer and wait for the Host to respond. The boot script also automatically mounts the virtual filesystem component to the "srv" directory. Requirements: The component must have a type of "modem" or "tunnel" in the computer or server. Network cards and Wireless Network cards have a type of "modem", while Linked cards have a type of "tunnel". Therefore, you can use a Network card, Wireless Network card, or Linked card to connect to the Host computer. The other components required are the filesystems you want in the Host's RAID array. You must also have at least one filesystem attached to the Host computer. How to set up ServerFS: The "Host", the computer or server hosting the ServerFS fileserver. Step 1: Install a modem or tunnel component (a Network card or Linked card will work for this, as each card acts as a modem or tunnel component respectively) to the Host computer or server, then install any filesystem components you want in the array. Step 2: Get the autorun.lua script on to the Host. If the Host has an internet component installed execute "pastebin get cg1ieKUi /autorun.lua" and the required autorun script will be downloaded, or if you are the server host get the script at http://www.pastebin.com/raw/cg1ieKUi and add the script to the root of the filesystem that hosts the operating system. Step 3: Run the autorun.lua script. The autorun script will allocate all non-primary filesystem components to a virtual filesystem array, and then will host the ServerFS functionality. The "Clients", or computers connecting to the ServerFS fileserver served by the Host. Step 1: Install a modem or tunnel component to the Client (a Network card, Wireless network card, or Linked card will work), then connect the Client to the Host. Do not connect it to the Host directly if a large amount of components are inserted to the Host, as this can cause the Client to stop and show a "Too many components connected" error. Step 2: Install the boot script to the Client's boot filesystem. If the Client has an internet component installed execute "pastebin get HAgcbg41 /boot/98_serverfilesystem.lua", or if you are the server host get the script at http://www.pastebin.com/raw/HAgcbg41 and add the script to the path of "/boot/98_serverfilesystem.lua" on the filesystem that hosts the operating system. Step 3: Reboot the computer. On startup a "srv" directory will be mounted. Additional Information: Please note that accessing functions of the server filesystem is noticeably slower than accessing the other filesystems on your network because the Host has to receive the request of the client from the network (which adds a delay that can be reduced by adding a CPU or APU to the relay if there is any), then process the request, and then send the processed information to the client. Don't expect it to be as fast as accessing functions of a filesystem attached to your computer. If the network has relays connected, if too many requests are sent at in to short a timespan this can cause requests to be dropped by the relay and cause problems. You should shut down the Host computer before adding or removing filesystems from or to the Host computer, as not doing so can cause issues where the server will attempt to access filesystems that are not attached to the computer. For anyone that says that the files you create from the client are blank, this issue is caused by a change of the filesystem handling in an update to the OpenComputer mod, where file handles are not numbers anymore. I already made an updated version which is compatible with the updated handling of file handles and fixes the error by using numbers for file handle identification. The updated version to fix the issue has now been published. Update the script on the Host, then test to see if that fixed your issue. If not then report the issue you are having (post the issue again and that you updated the script if the same issue occurs). Download: The hosting autorun.lua script is at http://www.pastebin.com/cg1ieKUi The 98_serverfilesystem.lua script to add in the boot directory of your clients is at http://pastebin.com/HAgcbg41
  9. Hello guys, my question is... can I "mount" the file system of my in-game pc to an ftp server or to a cloud? Or can I say that every time when i save changes to a file in the filesystem it saves this changes to the "real" filesystem? Well... then I can mount this real Folder an edit it in VS But then it must load into the game... but how can i do that? When these realy not works... can i clone and push Git repositorys in OC or in the OpenOS? And when that, how? Thanks, yout Panakotta00 P.S. yes I know that i can write something like that with the internetcard... but I will have a easier way. And sorry for terrible english ;-)
  10. So i'm working on a super simple logs library to make outputting errors/messages to a log alot simpler in a different program i'm working on. The issue is that i am completely unable to find a way to create a new file inside of code! I remember in computercraft it was simply trying to open a file that didn't exist yet, would create a new one. but for some reason, it's not doing it in this instance. my code is roughly: local fname = "output.txt" local file, err = io.open(fs.concat(shell.getWorkingDirectory(),"/logs/",fname),w)--i've tried both w and a at this point i'm really not sure what i'm doing wrong! is there a specific function to create a new file? make directory only lets you create folders from what my experiences/documentation has said.
  11. Hello folks!, i've been browsing, searching for hours now, tried and tested, done whatever i could do, i have been trying to find/make my code read from another file, that it also eventually should save to, but havent gotten that far yet ^^, the reason i want to do it with another file, is because, the server i play on crash, or if the area aint loaded, the computer needs to be rebooted, and i would like to be able to add new Todo's as i go. I must admit, this is a stupid and hard wall, and its properly VERY simple, once i get it :b, none the less, heres the code im at. --[[ [Requirements] ]]-- component = require("component") event = require("event") gpu = component.gpu computer = component.computer keyboard = require("keyboard") term = require("term") fs = require("filesystem") Scolors = { black = 0x000000, white = 0xf8f8ff, blue = 0x0000ff, lightGray = 0xd9d9d9, red = 0xff0000, purple = 0x9b30ff, carrot = 0xffa500, magenta = 0xcd00cd, lightBlue = 0x87cefa, yellow = 0xffff00, lime = 0x32cd32, pink = 0xffc0cb, gray = 0x696969, brown = 0x8b4500, green = 0x006400, cyan = 0x008b8b, olive = 0x6b8e23, gold = 0x8b6914, orangered = 0xdb4e02, diamond = 0x0fa7c7,crimson = 0xaf002a,fuchsia = 0xfd3f92, folly = 0xff004f, frenchBlue = 0x0072bb, lilac = 0x86608e, flax = 0xeedc82, darkGray = 0x563c5c, englishGreen = 0x1b4d3e, eggplant = 0x614051, deepPink = 0xff1493, ruby = 0x843f5b, orange = 0xf5c71a, lemon = 0xffd300, darkBlue = 0x002e63, bitterLime = 0xbfff00 } --[[ [Var] ]]-- --Line = 4 --[[ [Table for list] ]]-- Todo = {} --[[ [Functions] ]]-- function getTodo() for line in io.lines("TodoList.txt") do table.insert(Todo, line) end end --[[ [Exit Key] ]]-- function Exit() if x ~= nil and y ~= nil then if x >= 12 and x <= 18 and y == 1 then os.exit() elseif x >= 16 and x<=20 and y == 1 then os.execute("edit todo") end end end --[[ [MODE KEY] ]]-- function mode() h,w = gpu.getResolution() if x ~= nil and y ~= nil then gpu.set(h-10,w, "X: ".. x.. " Y: ".. y) os.sleep(1) if x >= 1 and x <= 9 and y == 1 then Add() os.sleep(1) end term.clear() os.sleep(.5) end end --[[ [ADD KEY]] ]]-- function Add() h, w = gpu.getResolution() gpu.setForeground(Scolors.orange) gpu.set(1, w,"Enter Todo: ") term.setCursor(13,w) data = io.open("TodoList.txt","a") input = io.read() if input then data:write(input.."\n") end data:close() end --[[ [Import Key] ]]-- function Import() if x ~= nil and y ~= nil then if x >= 24 and x <= 31 and y == 1 then getTodo() Line = 1 for k,v in pairs (Todo)do Line = Line + 1 gpu.set(1,Line, "* "..v) end end end end --[[ [Clean Key] ]]-- function clean() if x ~= nil and y ~= nil then if x >= 36 and x <= 42 and y == 1 then Line = 2 term.clear() end end end --[[ Pre Settings ]]-- gpu.setBackground(Scolors.gray) gpu.setForeground(Scolors.orange) h, w = gpu.maxResolution() gpu.setResolution(h/2,w/2) term.clear() Line = 1 --[[ Main Loop ]]-- while true do gpu.set(1,1,"Add Todo! - Exit - Edit - Update - Clear") --[[Touch Part]]-- _,_,x,y = event.pull(1,"touch") mode() Import() Exit() clean() end I Really hope theres someone out here, that feels like a good samaritan and help a fella out^^ //Regards Plazter
  12. I fixed up the computronics tape program to work with OC, but now I'm getting an error I cant figure out. /lib/filesystem.lua:483: attempt to index local 'self' (a nil value) Any help???
  13. When i try to save files with the Filesystem and the Filestream from Filesystem.open i get following error: /lib/filesystem.lua:467: attempt to index local 'self' (a nil value) stack traceback: kernel:730: in function '__index' /lib/filesystem.lua:467: in function 'close' stdin:1: in main chunk [C]: in function 'xpcall' kernel: 725: in function 'xpcall' /bin/lua.lua:62: in main chunk (...tail calls...) I typed this in lua console: fs = filesystem.open("/mnt/da0/adsfk","w") --da0 is HDD fs.write("something") fs.close() --here it happens Any help is appreciated!
×
×
  • Create New...

Important Information

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