Virtual File System Management

This is a discussion on Virtual File System Management within the C Programming forums, part of the General Programming Boards category; Hey all, trying to work out a way to manage a filesystem that is relatively small (~2mb). I already created ...

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    1

    Virtual File System Management

    Hey all, trying to work out a way to manage a filesystem that is relatively small (~2mb). I already created a way to keep control of the directories by way of a linked list whose data includes a char* of the filename, char* which is the timestamp, a FILE* that contains where it is located from within the filesystem, and the length of file in bytes. I need help on how to allocate the actual 2mb file to add files to it!

    --Skylar. and any help would be great.
    Attached Files Attached Files

  2. #2
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    So you pop in here posting a link to irrelevent code and you want us to what??? Like write the thing for you, maybe?

    Make some effort... post the relevent sections of code you have written... ask specific questions.

  3. #3
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,370
    Open the file, start writing, and stop when you reach two mebibytes?

    Soma
    Last edited by phantomotap; 04-23-2011 at 06:47 PM. Reason: @source: trololol

  4. #4
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,652
    The non-sequitur code is

    Code:
    #include <time.h>
    #include <unistd.h>
    #include <stdio.h>
    #ifndef TIMESTAMP_C
    #define TIMESTAMP_C
    char* giveTimeStamp()
    {
    	    time_t ltime; /* calendar time */
    	    ltime=time(NULL); /* get current cal time */
    	    return asctime( localtime(&ltime) ) ;
    };
    
    
    #endif
    WTF?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Virtual File system...random code
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 03-07-2005, 11:05 AM
  2. cybercafe management system
    By beely in forum Windows Programming
    Replies: 0
    Last Post: 01-06-2004, 03:40 AM
  3. Replies: 4
    Last Post: 10-21-2003, 05:28 PM
  4. how to design a CMS (content management system) in C++ ?
    By maulikpatel in forum C++ Programming
    Replies: 1
    Last Post: 06-07-2003, 09:37 PM
  5. File & System/OS Management
    By Shadow in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 01-17-2003, 02:40 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21