Git Product home page Git Product logo

filesystemapi's Introduction

FilesystemAPI

A simple Filesystem using Hashtables. (No re-hashing)

filesystemGIF

Commands

create <_path> - Create a file with the path given. - Prints "ok" if it's all right.
create_dir <_path> - Create a directory with the path given. - Prints "ok" if it's all right.
delete <_path> - Delete one resource without any children. - Prints "ok" if it's all right.
delete_r <_path> - Delete recursively the resource + his children. - Prints "ok" if it's all right.
write <_path> <_content> - Write inside a file. Prints "ok <number_of_characters>" if the file exists.
read <_path> - Read the content of a file. Prints "contenuto <_content> " if the file exists.
find <_name> - Find every folder/file with the given. - Prints every <_path_find> if file/s exists/-.
exit - Exit from the program (return 0 successfully).

Compile

gcc -std=c99 -O2 main.c main.h -o filesystem  

Information

No load and re-hashing were used in this project.
Free()s are not implemented (very bad!).
Delete_r is a fake one but it still works for this project :( .
Find uses a particular method to find elements and to order lexicographically (qsort), it's not the classic recursive method.

Tested on:

  • Win7 Pro x64 - i7 4790k (4.0 GHz - 4core/8thread) - 16 GB DDR3 (1866 MHz) - SSD Samsung Evo 850 (250 GB)
  • Elementary OS x64 - i7 6500U (2.6 GHz - 2core/4thread) - 16 GB DDR3 (1866 MHz) - SSD SanDisk (240 GB)

You can find any further information in the comments (main.c, main.h)

Author

Andrea Losavio - facebook

filesystemapi's People

Contributors

ontech7 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.