Thread: Virtual File System Management

  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
    5,108
    Open the file, start writing, and stop when you reach two mebibytes?

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

  4. #4
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    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, 04: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, 08: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