2016-04-12 12:00:23 -07:00
|
|
|
import eina_types;
|
|
|
|
|
|
|
|
struct Eio.Data
|
|
|
|
{
|
|
|
|
[[A structure to handle arbitrary data to be sent over Promises.]]
|
2016-10-27 07:51:42 -07:00
|
|
|
data: void_ptr; [[Private data pointer]]
|
|
|
|
size: uint; [[Size of private data]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
|
|
|
|
2016-07-31 21:41:05 -07:00
|
|
|
class Efl.Io.Manager (Efl.Loop_User)
|
2016-04-12 12:00:23 -07:00
|
|
|
{
|
|
|
|
[[Class representing an asynchronous file operation.]]
|
|
|
|
|
|
|
|
methods {
|
2016-07-31 21:41:05 -07:00
|
|
|
ls {
|
2016-04-12 12:00:23 -07:00
|
|
|
[[Lists entries in a given path.]]
|
|
|
|
params {
|
2016-11-07 06:53:35 -08:00
|
|
|
@in path: string; [[Path we want to list entries for]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
2016-11-07 06:53:35 -08:00
|
|
|
return: future<uint64, const(array<string>)>; [[List of entries in path]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
|
|
|
|
2016-07-31 21:41:05 -07:00
|
|
|
direct_ls {
|
2016-04-12 12:00:23 -07:00
|
|
|
[[Lists entries in a given path with more information.]]
|
|
|
|
params {
|
2016-11-07 06:53:35 -08:00
|
|
|
@in path: string;[[Path we want to list entries for]]
|
2016-11-28 11:05:28 -08:00
|
|
|
@in recursive: bool; [[If $true, list entries recursively, $false otherwise]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
2016-11-28 11:05:28 -08:00
|
|
|
return: future<uint64, const(array<Eina.File.Direct.Info>)>; [[List of entries in path]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
|
|
|
|
2016-07-31 21:41:05 -07:00
|
|
|
stat_ls {
|
2016-04-12 12:00:23 -07:00
|
|
|
[[Lists entries in a given path with stat information.]]
|
|
|
|
params {
|
2016-11-07 06:53:35 -08:00
|
|
|
@in path: string;[[Path we want to list entries for]]
|
2016-11-28 11:05:28 -08:00
|
|
|
@in recursive: bool; [[If $true, list entries recursively, $false otherwise]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
2016-11-28 11:05:28 -08:00
|
|
|
return: future<uint64, const(array<Eina.File.Direct.Info>)>; [[List of entries in path]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
|
|
|
|
2016-07-31 21:41:05 -07:00
|
|
|
// Extended attributes
|
|
|
|
xattr_ls {
|
|
|
|
[[Lists all extended attributes asynchronously.]]
|
2016-04-12 12:00:23 -07:00
|
|
|
params {
|
2016-11-11 00:15:24 -08:00
|
|
|
@in path: string; [[Path we want to list entries for]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
2016-11-07 06:53:35 -08:00
|
|
|
return: future<uint64, const(array<string>)>; [[Extended attributes]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
|
|
|
|
2016-07-31 21:41:05 -07:00
|
|
|
stat {
|
2016-04-12 12:00:23 -07:00
|
|
|
[[Get stat info on a given file/directory.]]
|
|
|
|
params {
|
2016-11-07 06:53:35 -08:00
|
|
|
@in path: string; [[Path we want to get stat information for]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
2017-09-27 16:32:58 -07:00
|
|
|
return: ptr(Eina.Future); [[Stat information]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
|
|
|
|
2016-07-31 21:41:05 -07:00
|
|
|
// FIXME: Add helper for Eina.Value to Xattr
|
|
|
|
@property xattr {
|
2016-04-12 12:00:23 -07:00
|
|
|
[[Retrieves or sets information of a given extended attribute.]]
|
|
|
|
set {
|
|
|
|
values {
|
2016-11-28 11:05:28 -08:00
|
|
|
data: ptr(Eina.Binbuf); [[Data to set as information]]
|
2016-11-11 00:15:24 -08:00
|
|
|
flags: Eina.Xattr.Flags; [[Extended attributes flags]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
2017-09-15 07:44:26 -07:00
|
|
|
return: ptr(Eina.Future) @owned; [[Future for asynchronous set operation]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
|
|
|
get {
|
2017-09-15 07:44:26 -07:00
|
|
|
return: ptr(Eina.Future) @owned; [[Information]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
|
|
|
keys {
|
2016-11-11 00:15:24 -08:00
|
|
|
path: string; [[File path]]
|
2016-11-28 11:05:28 -08:00
|
|
|
attribute: string; [[Attribute name]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// helper api
|
2016-07-31 21:41:05 -07:00
|
|
|
open {
|
2016-04-12 12:00:23 -07:00
|
|
|
[[Opens a file.
|
|
|
|
|
|
|
|
The fulfilled value in the promise will be the Eina.File*.]]
|
|
|
|
params {
|
2016-11-07 06:53:35 -08:00
|
|
|
@in path: string; [[Path to file]]
|
|
|
|
@in shared: bool; [[$true if the file can be accessed by others, $false otherwise]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
2017-09-15 07:44:26 -07:00
|
|
|
return: ptr(Eina.Future) @owned; [[Eina file handle]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
2016-07-31 21:41:05 -07:00
|
|
|
close {
|
2016-04-12 12:00:23 -07:00
|
|
|
[[Closes an open Eina.File.]]
|
|
|
|
params {
|
2016-11-07 06:53:35 -08:00
|
|
|
@in file: ptr(Eina.File); [[Eina file handle]]
|
2016-04-12 12:00:23 -07:00
|
|
|
// Here we're just interested whether the promise was fullfilled or not. No value needed.
|
|
|
|
}
|
2017-09-15 07:44:26 -07:00
|
|
|
return: ptr(Eina.Future) @owned; [[Close return code]]
|
2016-04-12 12:00:23 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|