get_char() 공개 메소드

public get_char ( ) : char
리턴 char
예제 #1
0
파일: mount.cs 프로젝트: petebarber/NFS
        private void Mount(rpcCracker cracker, rpcPacker reply)
        {
            uint length = cracker.get_uint32();

            string dirPath = "";

            for (uint i = 0; i < length; ++i)
                dirPath += cracker.get_char();

            Console.WriteLine("Mount {0}:{1}", length, dirPath);

            if (Directory.Exists(dirPath) == false)
            {
                reply.setUint32(2);	// Errno for no such file or directory
                reply.setUint32(0);	// Where fh would go
            }
            else
            {
                fhandle fh = FileTable.Add(new FileEntry(dirPath));

                reply.setUint32(0);		// Success

                fh.Pack(reply);
            }
        }
예제 #2
0
파일: mount.cs 프로젝트: petebarber/NFS
        private void UMount(rpcCracker cracker, rpcPacker reply)
        {
            uint length = cracker.get_uint32();

            string dirPath = "";

            for (uint i = 0; i < length; ++i)
                dirPath += cracker.get_char();

            Console.WriteLine("UMount {0}:{1}", length, dirPath);
            #if FOO
            uint fh = fileHandles.Find(

            if (fileHandles.Remove(dirPath) == false)
                Console.WriteLine("{0} not mounted", dirPath);
            #endif
        }