| | |
File System simulation
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Apr 2006
Posts: 9
Reputation:
Solved Threads: 0
Hey guys!!!
I know these simulations are too much but....
still another one and I am havin some problems with that///
I have to create a file system simulation that has to understand these commands:
cr a - create a new file named a, size ==0;
rm a - remove file a
op a - open file a
cl a - close file a
rd a - read file a
wr a - write file a
cp a b - copy file a to file b
I have to use:
DIRECTORY IMPLEMENTATITON
LINEAR LIST
ALLOCATION METHODS
CONTIGUOUS ALLOCATION
LINKED ALLOCATION(FAT)
FREE - SPACE MANAGEMENT
FREE-SPACE LIST
PROTECTION AND SECURITY
I HAVE TO USE AN ARRAY OF BYTES
P.S PLEASE GIVE ME SOME IDEA... I KNOW HOW TO DO SOME OF THE STAFF BUT I AM NOT SURE IF THIS IS THE RIGHT WAY TO APPROACH IT
LIKE INSTEAD OF ARRAY OF BYTES I WILL CREATE A BYTE BUFFER TO ALLOCATE THE SPACE...
BUT I HAVE NO IDEA HOW TO ALLOCATE THE SPACE ONCE THE FILE IS CREATED!!!!
I know these simulations are too much but....
still another one and I am havin some problems with that///
I have to create a file system simulation that has to understand these commands:
cr a - create a new file named a, size ==0;
rm a - remove file a
op a - open file a
cl a - close file a
rd a - read file a
wr a - write file a
cp a b - copy file a to file b
I have to use:
DIRECTORY IMPLEMENTATITON
LINEAR LIST
ALLOCATION METHODS
CONTIGUOUS ALLOCATION
LINKED ALLOCATION(FAT)
FREE - SPACE MANAGEMENT
FREE-SPACE LIST
PROTECTION AND SECURITY
I HAVE TO USE AN ARRAY OF BYTES
P.S PLEASE GIVE ME SOME IDEA... I KNOW HOW TO DO SOME OF THE STAFF BUT I AM NOT SURE IF THIS IS THE RIGHT WAY TO APPROACH IT
LIKE INSTEAD OF ARRAY OF BYTES I WILL CREATE A BYTE BUFFER TO ALLOCATE THE SPACE...
BUT I HAVE NO IDEA HOW TO ALLOCATE THE SPACE ONCE THE FILE IS CREATED!!!!
•
•
Join Date: Sep 2008
Posts: 1,620
Reputation:
Solved Threads: 205
I don't understand the second half of your explanation, so hopefully this is useful to you. File class: http://java.sun.com/javase/6/docs/api/java/io/File.html
For example you can easily create a new file using the createNewFile method. There are plenty of useful methods in there.
For example you can easily create a new file using the createNewFile method. There are plenty of useful methods in there.
Last edited by stephen84s; May 14th, 2009 at 3:00 am.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
"How to ask questions the smart way ?"
"How to ask questions the smart way ?"
![]() |
Similar Threads
- File System Error 1026???? (Windows 95 / 98 / Me)
- understanding file system (C++)
- Checking file system on C: ?? (Windows NT / 2000 / XP)
- extending windows "file system" attributes (C#)
- Cannot detect the drive names and their file system (Windows NT / 2000 / XP)
- a device file in system.ini file damaged (Windows 95 / 98 / Me)
- Errors with Linux file system (*nix Hardware Configuration)
- Error occured during the file system check. (*nix Software)
- Checking file on System C (Windows NT / 2000 / XP)
Other Threads in the Java Forum
- Previous Thread: Need advice on a future application
- Next Thread: Confused with threads-help with a homework
| Thread Tools | Search this Thread |
add android api applet application applications array arrays automation bank binary bluetooth chat class classes client code component converter database db development dice digit draw eclipse equation error event exception formatingtextintooltipjava fractal functiontesting game givemetehcodez graphics gui health html hyper ide idea image infinite input int integer j2me java javame javaprojects jni jpanel julia linux list loop main map method methods mobile myregfun netbeans newbie nonstatic openjavafx oracle pattern pearl print problem program programming project recursion repositories scanner screen scrollbar server set size sms sort sorting spamblocker sql sqlserver state storm string superclass swing text-file thread threads time tree windows







)