-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathln.java
More file actions
34 lines (30 loc) · 844 Bytes
/
ln.java
File metadata and controls
34 lines (30 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
public class ln
{
/**
* The name of this program.
* This is the program name that is used
* when displaying error messages.
*/
public static String PROGRAM_NAME = "ln" ;
/**
* Lists information about named files or directories.
* @exception java.lang.Exception if an exception is thrown
* by an underlying operation
*/
public static void main( String[] args ) throws Exception
{
if( args.length < 2 )
{
System.err.println( PROGRAM_NAME + ": too few arguments" ) ;
Kernel.exit( 1 ) ;
}
// initialize the file system simulator kernel
Kernel.initialize();
int status = Kernel.link(args[0], args[1]);
if( status < 0 )
{
Kernel.exit( 2 ) ;
}
Kernel.exit( 0 ) ;
}
}