Lines Matching +full:- +full:3

16 **   lfs.symlinkattributes (filepath [, attributename]) -- thanks to Sam Roberts
30 #define _FILE_OFFSET_BITS 64 /* Linux, Solaris and HP-UX */
71 #define LFS_VERSION "1.6.3"
150 return 3; in pusherror()
155 if (i==-1) in pushresult()
229 … http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt__locking.asp in _file_lock()
261 return (code != -1); in _file_lock()
291 lock->fd = fd; in lfs_lock_dir()
293 lua_setmetatable (L, -2); in lfs_lock_dir()
298 if(lock->fd != INVALID_HANDLE_VALUE) { in lfs_unlock_dir()
299 CloseHandle(lock->fd); in lfs_unlock_dir()
300 lock->fd=INVALID_HANDLE_VALUE; in lfs_unlock_dir()
320 if(symlink("lock", ln) == -1) { in lfs_lock_dir()
324 lock->ln = ln; in lfs_lock_dir()
326 lua_setmetatable (L, -2); in lfs_lock_dir()
331 if(lock->ln) { in lfs_unlock_dir()
332 unlink(lock->ln); in lfs_unlock_dir()
333 free(lock->ln); in lfs_unlock_dir()
334 lock->ln = NULL; in lfs_unlock_dir()
345 if (res != -1) { in lfs_g_setmode()
362 return 3; in lfs_g_setmode()
374 ** @param #3 Number with start position (optional).
380 const long start = (long) luaL_optinteger (L, 3, 0); in file_lock()
397 ** @param #3 Number with length (optional).
402 long len = (long) luaL_optinteger (L, 3, 0); in file_unlock()
418 ** @param #3 True if link is symbolic (optional).
426 (lua_toboolean(L,3) ? symlink : link)(oldpath, newpath), NULL); in make_link()
486 luaL_argcheck (L, d->closed == 0, 1, "closed directory"); in dir_iter()
488 if (d->hFile == 0L) { /* first entry */ in dir_iter()
489 if ((d->hFile = _findfirst (d->pattern, &c_file)) == -1L) { in dir_iter()
492 d->closed = 1; in dir_iter()
499 if (_findnext (d->hFile, &c_file) == -1L) { in dir_iter()
501 _findclose (d->hFile); in dir_iter()
502 d->closed = 1; in dir_iter()
510 if ((entry = readdir (d->dir)) != NULL) { in dir_iter()
511 lua_pushstring (L, entry->d_name); in dir_iter()
515 closedir (d->dir); in dir_iter()
516 d->closed = 1; in dir_iter()
529 if (!d->closed && d->hFile) { in dir_close()
530 _findclose (d->hFile); in dir_close()
533 if (!d->closed && d->dir) { in dir_close()
534 closedir (d->dir); in dir_close()
537 d->closed = 1; in dir_close()
551 lua_setmetatable (L, -2); in dir_iter_factory()
552 d->closed = 0; in dir_iter_factory()
554 d->hFile = 0L; in dir_iter_factory()
555 if (strlen(path) > MAX_PATH-2) in dir_iter_factory()
558 sprintf (d->pattern, "%s/*", path); in dir_iter_factory()
560 d->dir = opendir (path); in dir_iter_factory()
561 if (d->dir == NULL) in dir_iter_factory()
577 lua_setfield(L, -2, "next"); in dir_create_meta()
579 lua_setfield(L, -2, "close"); in dir_create_meta()
582 lua_setfield(L, -2, "__index"); in dir_create_meta()
584 lua_setfield (L, -2, "__gc"); in dir_create_meta()
598 lua_setfield(L, -2, "free"); in lock_create_meta()
601 lua_setfield(L, -2, "__index"); in lock_create_meta()
603 lua_setfield(L, -2, "__gc"); in lock_create_meta()
669 utb.modtime = (time_t) luaL_optinteger (L, 3, utb.actime);
684 lua_pushstring (L, mode2string (info->st_mode));
688 lua_pushinteger (L, (lua_Integer) info->st_dev);
692 lua_pushinteger (L, (lua_Integer) info->st_ino);
696 lua_pushinteger (L, (lua_Integer)info->st_nlink);
698 /* user-id of owner */
700 lua_pushinteger (L, (lua_Integer)info->st_uid);
702 /* group-id of owner */
704 lua_pushinteger (L, (lua_Integer)info->st_gid);
708 lua_pushinteger (L, (lua_Integer) info->st_rdev);
712 lua_pushinteger (L, (lua_Integer) info->st_atime);
716 lua_pushinteger (L, (lua_Integer) info->st_mtime);
720 lua_pushinteger (L, (lua_Integer) info->st_ctime);
724 lua_pushinteger (L, (lua_Integer)info->st_size);
729 lua_pushinteger (L, (lua_Integer)info->st_blocks);
733 lua_pushinteger (L, (lua_Integer)info->st_blksize);
743 static char perms[10] = "---------";
745 for (i=0;i<9;i++) perms[i]='-';
747 { perms[0] = 'r'; perms[3] = 'r'; perms[6] = 'r'; }
756 static char perms[10] = "---------";
758 for (i=0;i<9;i++) perms[i]='-';
762 if (mode & S_IRGRP) perms[3] = 'r';
774 lua_pushstring (L, perm2string (info->st_mode));
837 lua_rawset (L, -3);
864 lua_pushliteral (L, "Copyright (C) 2003-2012 Kepler Project");
865 lua_settable (L, -3);
868 lua_settable (L, -3);
871 lua_settable (L, -3);
896 lua_pushvalue(L, -1);