Module: Dokan

Defined in:
ext/dokan-ruby-0.1.5.1229/dokan_lib.c

Constant Summary collapse

READONLY =
INT2FIX(FILE_ATTRIBUTE_READONLY)
HIDDEN =
INT2FIX(FILE_ATTRIBUTE_HIDDEN)
SYSTEM =
INT2FIX(FILE_ATTRIBUTE_SYSTEM)
DIRECTORY =
INT2FIX(FILE_ATTRIBUTE_DIRECTORY)
ARCHIVE =
INT2FIX(FILE_ATTRIBUTE_ARCHIVE)
NORMAL =

DR_define_const(g_cDokan, FILE_ATTRIBUTE_DEVICE);

INT2FIX(FILE_ATTRIBUTE_NORMAL)
TEMPORARY =
INT2FIX(FILE_ATTRIBUTE_TEMPORARY)
SPARSE_FILE =
INT2FIX(FILE_ATTRIBUTE_SPARSE_FILE)
REPARSE_POINT =
INT2FIX(FILE_ATTRIBUTE_REPARSE_POINT)
COMPRESSED =
INT2FIX(FILE_ATTRIBUTE_COMPRESSED)
OFFLINE =
INT2FIX(FILE_ATTRIBUTE_OFFLINE)
NOT_CONTENT_INDEXED =
INT2FIX(FILE_ATTRIBUTE_NOT_CONTENT_INDEXED)
ENCRYPTED =
INT2FIX(FILE_ATTRIBUTE_ENCRYPTED)

Class Method Summary collapse

Class Method Details

.debug=(isDebug) ⇒ Object



1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
# File 'ext/dokan-ruby-0.1.5.1229/dokan_lib.c', line 1931

static VALUE
DR_dokan_set_debug(
	VALUE	self,
	VALUE	isDebug)
{
	if(RTEST(isDebug))
		g_Debug = TRUE;
	else
		g_Debug = FALSE;

	return Qnil;
}

.mount(DriveLetter, Root) ⇒ Object

rb_define_singleton_method(g_cDokan, “mount_under”, DR_dokan_mount_under, 1);



1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
# File 'ext/dokan-ruby-0.1.5.1229/dokan_lib.c', line 1915

static VALUE
DR_dokan_mount(
	VALUE	self,
	VALUE	DriveLetter,
	VALUE	Root)
{
	StringValue(DriveLetter);

	rb_iv_set(self, "@drive", DriveLetter);
	rb_iv_set(self, "@root", Root);

	g_DokanRoot = Root;

	return DR_dokan_run(self);
}

.set_debug(isDebug) ⇒ Object



1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
# File 'ext/dokan-ruby-0.1.5.1229/dokan_lib.c', line 1931

static VALUE
DR_dokan_set_debug(
	VALUE	self,
	VALUE	isDebug)
{
	if(RTEST(isDebug))
		g_Debug = TRUE;
	else
		g_Debug = FALSE;

	return Qnil;
}

.unmountObject

rb_define_singleton_method(g_cDokan, “root=”, DR_dokan_set_root, 1);



1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
# File 'ext/dokan-ruby-0.1.5.1229/dokan_lib.c', line 1734

static VALUE
DR_dokan_unmount(
	 VALUE self)
{
	wchar_t letter;

	VALUE	drive = rb_iv_get(self, "@drive");

	StringValue(drive);

	mbtowc(&letter, RSTRING(drive)->ptr, 1);

	DokanUnmount(letter);

	return Qtrue;
}