acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
file Namespace Reference

Classes

class  action
class  buffered_file
class  circular_file
class  dialog_base
class  enumerator
class  exception
class  file
class  file_dialog
class  file_dialog_filter
class  file_dialog_filter_item
struct  file_status
class  folder_dialog
class  item
class  item_array
class  listener
struct  LISTING
class  listing_base
class  memory_map
class  os_watch
class  os_watcher
class  ostream_flush
class  path
class  path_array
class  path_array_base
struct  path_meta
class  path_object
struct  PROCESS_INFO_t
class  readable
class  real_and_logical_path
class  reference
class  relative_name_listing
class  sealed
 Internal watch data. More...
class  set_width
class  streamable
class  streamable_base
class  streamable_composite
class  text_file
class  transfer_file
class  translatable
class  watch
class  watcher
class  writable

Typedefs

using pos_type = filesize
using off_type = filesize
using iostate = ::file::e_iostate
using seekdir = ::enum_seek
typedef ::pointer< text_file > text_buffer_pointer
using listing = ::array_particle < listing_base >
using path_pointer = ::pointer<path_object>
typedef ::pointer_array< watch > file_watch_array

Enumerations

enum  enum_open : ::uptr {
  e_open_none = 0ull , e_open_read = 0x000001ull , e_open_write = 0x000002ull , e_open_read_write = 0x000003ull ,
  e_open_share_compat = 0x000000ull , e_open_share_exclusive = 0x000010ull , e_open_share_deny_write = 0x000020ull , e_open_share_deny_read = 0x000030ull ,
  e_open_share_deny_none = 0x000040ull , e_open_share_mask = e_open_share_deny_none | e_open_share_deny_read | e_open_share_deny_write | e_open_share_exclusive , e_open_no_inherit = 0x000080ull , e_open_create = 0x001000ull ,
  e_open_no_truncate = 0x002000ull , e_open_text = 0x004000ull , e_open_binary = 0x008000ull , e_open_defer_create_directory = 0x010000ull ,
  e_open_update_unknown_length_supported = 0x020000ull , e_open_truncate = 0x040000ull , e_open_no_callstack = 0x080000ull , e_open_no_cache = 0x100000ull ,
  e_open_no_share_violation_wait = 0x200000ull , e_open_no_follow_uniform_resource_locator = 0x400000ull , e_open_no_exception_on_open = 0x10000000ull , e_open_file = 0x20000000ull ,
  e_open_no_exception_if_not_found = 0x40000000ull , _e_open_delete = 0x80000000ull , _e_open_stat = 0x100000000ull , _e_open_set_stat = 0x200000000ull ,
  _e_open_create_directory = 0x400000000ull , _e_open_set_current_directory = 0x800000000ull
}
enum  enum_state { e_state_none = 0 , e_state_end_of_file = 1 , e_state_read_line_truncated = 2 }
enum  enum_link {
  e_link_none = 0 , e_link_target = 1 , e_link_folder = 2 , e_link_icon = 4 ,
  e_link_arguments = 8 , e_link_all = e_link_target | e_link_folder | e_link_icon | e_link_arguments
}
enum  enum_flag : ::i64 {
  e_flag_none = 0 , e_flag_file = 1 , e_flag_folder = 2 , e_flag_file_or_folder = 3 ,
  e_flag_folder_ex001 = 1 << 2 , e_flag_folder_ex001_calc = 1 << 3 , e_flag_required = 1 << 4 , e_flag_bypass_cache = 1 << 5 ,
  e_flag_dont_resolve_alias = 1 << 6 , e_flag_resolve_alias = 1 << 7 , e_flag_get_local_path = 1 << 8 , e_flag_in_zip = 1 << 9 ,
  e_flag_has_subfolder = 1 << 10 , e_flag_has_subfolder_unknown = 1 << 11 , e_flag_final_path = 1 << 12 , e_flag_file_ex001 = 1 << 13 ,
  e_flag_file_ex001_calc = 1 << 14
}
enum  e_iostate {
  goodbit = 0x00 , eofbit = 0x01 , failbit = 0x02 , badbit = 0x04 ,
  _Hardfail = 0x10
}
enum  enum_stream { e_stream_none , e_stream_input , e_stream_output }
enum  fmtflags : ::u32 {
  nofmtflags = 0 , boolalpha = 0x00000001 , showbase = 0x00000002 , showpoint = 0x00000004 ,
  showpos = 0x00000008 , skipws = 0x00000010 , unitbuf = 0x00000020 , uppercase = 0x00000040 ,
  dec = 0x00000080 , hex = 0x00000100 , oct = 0x00000200 , fixed = 0x00000400 ,
  scientific = 0x00000800 , internal = 0x00001000 , left = 0x00002000 , right = 0x00004000 ,
  network_payload = 0x00008000 , separated = 0x00010000 , adjustfield = left | right | internal , basefield = dec | oct | hex ,
  f32field = scientific | fixed
}
enum  enum_buffer { e_buffer_read , e_buffer_write , e_buffer_commit , e_buffer_check }
enum  enum_action { e_action_none = 0 , e_action_add = 1 , e_action_delete = 2 , e_action_modify = 4 }
enum  enum_type : ::i32 {
  e_type_unknown = 0 , e_type_exists = 1 << 0 , e_type_folder2 = 1 << 1 , e_type_file2 = 1 << 2 ,
  e_type_element2 = 1 << 3 , e_type_executable = 1 << 4 , e_type_non_executable = 1 << 5 , e_type_existent_folder = e_type_exists | e_type_folder2 ,
  e_type_existent_file = e_type_exists | e_type_file2 , e_type_existent_element = e_type_exists | e_type_element2 , e_type_file_or_folder2 = e_type_folder2 | e_type_file2 , e_type_existent_file_or_folder = e_type_exists | e_type_folder2 | e_type_file2 ,
  e_type_doesnt_exist = I32_MINIMUM
}

Functions

 DECLARE_C_FLAG (e_open, enum_open)
 DECLARE_C_FLAG (e_state, enum_state)
 DECLARE_C_FLAG (e_link, enum_link)
CLASS_DECL_ACME bool output (::file::file *pfileOut, const ::function< bool(::file::file *pfileOut, ::file::file *pfileIn) > &function, ::file::file *pfileIn)
 DECLARE_C_FLAG (e_flag, enum_flag)
const_char_pointer status_short_description (const ::e_status &estatus)
::i32 dos_to_os_error (::i32 lDosErr)
CLASS_DECL_ACME bool should_ignore_file_exception_callstack (const ::e_status &estatus)
void write (file *pwriter, const ::block &block)
CLASS_DECL_ACME void set_no_cache (::payload &payload)
CLASS_DECL_ACME::i32_boolean get_no_cache (const ::payload &payload)
 DECLARE_C_FLAG (e_type, enum_type)
bool case_insensitive_begins_eat (string &str, const ::scoped_string &scopedstrPrefix)
 DECLARE_C_FLAG (e_action, enum_action)
bool RefreshWatch (watch_ref ^ pWatch, bool _clear=false)
void DestroyWatch (watch_ref ^ pwatch)
 Unpacks happenings and passes them to a user defined callback.

Detailed Description

Copyright (c) 2009 James Wynn (james.nosp@m.@jam.nosp@m.eswyn.nosp@m.n.co.nosp@m.m)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to uxse, cxopy, mxodify, mxerge, pxublish, dxistribute, sxublicense, and/or sxell copies of the Software, and to permit persons to whom the Software is furnished to do so, topic to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Implementation for Windows. Uses ReadDirectoryChangesW to watch for file system changes.

Author
James Wynn
Date
4/15/2009

Copyright (c) 2009 James Wynn (james.nosp@m.@jam.nosp@m.eswyn.nosp@m.n.co.nosp@m.m)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to uxse, cxopy, mxodify, mxerge, pxublish, dxistribute, sxublicense, and/or sxell copies of the Software, and to permit persons to whom the Software is furnished to do so, topic to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Enumeration Type Documentation

◆ enum_action

Actions to listen for. Rename will send two happenings, one for the deletion of the old file, and one for the creation of the ___new file.

Enumerator
e_action_add 

Sent when a file is created or renamed.

e_action_delete 

Sent when a file is deleted or renamed.

e_action_modify 

Sent when a file is modified.

Function Documentation

◆ DestroyWatch()

void file::DestroyWatch ( watch_ref ^ pwatch)

Unpacks happenings and passes them to a user defined callback.

Stops monitoring a directory.