Results 1 to 3 of 3

Thread: Read a File of /dev/*

  1. #1
    Join Date
    Oct 2012
    Beans
    5

    Read a File of /dev/*

    Hi

    I need to read a file, but this file is written by a driver, for example /dev/myFile.
    I want to read the file with Java, and I have tried with java.io classes, I can read other files, but I can't read myFile, maybe the reason is that the file is always changing with the information of the device.
    I tried with C# and I couldn't either.

    Thank you

  2. #2
    Join Date
    Jan 2010
    Location
    Sydney, Australia
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Read a File of /dev/*

    Quote Originally Posted by JAG Franco View Post
    Hi

    I need to read a file, but this file is written by a driver, for example /dev/myFile.
    I want to read the file with Java, and I have tried with java.io classes, I can read other files, but I can't read myFile, maybe the reason is that the file is always changing with the information of the device.
    I tried with C# and I couldn't either.

    Thank you
    Have you checked the file permissions of /dev/myFile?
    Make sure it has read bits on in order to get it read by your Java code .
    “Progress is made by lazy men looking for easier ways to do things”
    — Robert A. Heinlein

  3. #3
    Join Date
    Oct 2012
    Beans
    5

    Re: Read a File of /dev/*

    The file permissions are:
    crw-rw-rw- 1

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •