Plan 9 from Bell Labs’s /usr/web/sources/contrib/de0u/root/sys/src/cmd/divergefs/fiddata.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.



/** anonymous fiddata struct */
typedef struct FidData FidData;
#pragma incomplete FidData /* See 9fans "new compiler" 2005-01-07 */

/** create a new fiddata associated with path */
FidData *fiddata_new(String *path);

/** same as fiddata_new but accepts char * string */
FidData *fiddata_charpath_new(char *path);

/** destructor */
void fiddata_free(FidData *self);

/** return a copy of self with only the same path */
FidData *fiddata_copy(FidData *self);

/** returns the path as c string */
char *fiddata_path(FidData *self);

/** return the path as string */
String *fiddata_path_string(FidData *self);

/** sets the path */
void fiddata_set_path_string(FidData *self, String *path);

/** sets the file handle, and frees the old handle */
void fiddata_set_handle(FidData *self, FileHandle *handle);

/** clears the file handle and free any associated handle */
void fiddata_clear_handle(FidData *self);

/** reads any data from self's file handle, and respond the 9p request */
void fiddata_read(FidData *self, Req *request, HoleManager *holemanager);

/** writes any data to self's file handle, and respond the 9p request */
void fiddata_write(FidData *self, Req *request);

/** return true if fd associated with self is opened */
int fiddata_isopen(FidData *self);

/** print out information related to self */
void fiddata_dump(FidData *self);



Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].