File lock


GiliSoft File Lock Pro 10.8.0

GiliSoft File Lock Pro 10.8.0 – это программа с помощью которой можно быстро и безопасно спрятать или закрыть доступ к файлам, папкам или целым дискам на Вашем компьютере. Для защиты файлов программа использует 256-битное AES-шифрование (Encryption Standard Adopted by the US Government). Также поддерживается защита любых портативных носителей. Вы можете зашифровать и упаковать важные данные в один файл и затем использовать его на компьютере без установленной программы File Lock. Кроме того программа позволяет полностью удалить конфиденциальные данные с жесткого диска путем перезаписи его несколько раз без возможности восстановления. Для запуска и доступа к настройкам программы требуется ввести пароль, то есть никто не сможет снять защиту или удалить программу. Скачать программу можно по прямой ссылке (с облака) внизу страницы.

Основные возможности программы GiliSoft File Lock:

  • Возможность скрыть личные файлы, папки и диски, чтобы сделать их полностью невидимыми для пользователей и программ.
  • Возможность заблокировать доступ к файлам, папкам или дискам (пользователи не смогут открывать, читать, изменять, перемещать, удалять, копировать, переименовывать защищенные данные без пароля).
  • Шифрование папок и файлов любого типа.
  • Упаковка и шифрование папок в исполняемый файл (.exe) при помощи AES алгоритма шифрования.
  • Защита паролем от удаления или изменений в программе.
  • Полностью поддерживает Intel ® Pentium D Dual-Core и AMD Athlon ™ 64×2 Dual-CoreProcessor.

 

нажмите на картинку и она увеличится

            

Системные требования:
Операционная система:Windows XP,Vista,7,8,10 (x86,x64)
Процессор:1 ГГц
Оперативная память:512 МБ
Место на жестком диске: 30 МБ
Язык интерфейса:английский
Размер: 6 МБ
апте4ка:в комплекте
  
*архив БЕЗ пароля

    КАК ТУТ СКАЧАТЬ – ВИДЕО

    откроется в новом окне     откроется в новом окне     откроется в новом окне

xn--c1adkjnf.net

File Locking - GitLab Documentation

Notes:

  • Introduced in GitLab Enterprise Edition Premium 8.9.
  • This feature needs to have a license with the "File Lock" option enabled. If you are using Enterprise Edition Premium but you don't see the "Lock" button, ask your GitLab administrator.

File Locking helps you avoid merge conflicts and better manage your binary files. Lock any file or directory, make your changes, and then unlock it so another member of the team can edit it.

Overview

Working with multiple people on the same file can be a risk. Conflicts when merging a non-text file are hard to overcome and will require a lot of manual work to resolve. With GitLab Enterprise Edition Premium, File Locking helps you avoid merge conflicts and better manage your binary files by preventing everyone, except you, from modifying a specific file or entire directory.

Use-cases

The file locking feature is useful in situations when:

  • Multiple people are working on the same file and you want to avoid merge conflicts.
  • Your repository contains binary files in which situation there is no easy way to tell the diff between yours and your colleagues' changes.
  • Prevent design assets from being overwritten.

Locked directories are locked recursively, which means that everything that lies under them is also locked.

Permissions on file locking

The user that locks a file or directory is the only one that can edit and push their changes back to the repository where the locked objects are located.

Locks can be created by any person who has push access to the repository; i.e., Developer and higher level, and can be removed solely by their author and any user with Master permissions and above.

If a file is locked and you are not the author of its locked state, a pre-receive hook will reject your changes when you try to push. In the following example, a user who has no permissions on the locked .gitignore file will see the message below:

Counting objects: 3, done. Delta compression using up to 4 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 320 bytes | 0 bytes/s, done. Total 3 (delta 1), reused 0 (delta 0) remote: GitLab: The path '.gitignore' is locked by Administrator To https://example.com/gitlab-org/gitlab-ce.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://example.com/gitlab-org/gitlab-ce.git'

Similarly, when a user that is not the author of the locked state of a file accepts a merge request, an error message will appear stating that the file is locked.

Locking a file or a directory

Note: Locking only works for the default branch you have set in the project's settings (usually master).

To lock a file, navigate to the repository tree under the Repository > Files tab, pick the file you want to lock and hit the "Lock" button.

To lock an entire directory, look for the "Lock" link next to "History".

After you lock a file or directory, it will appear as locked in the repository view.

Unlocking a file or a directory

To unlock a file or a directory, follow the same procedure as when you locked them. For a detailed view of every existing lock, see the next section on "Viewing and managing existing locks".

Viewing and managing existing locks

To view or manage every existing lock, navigate to the Project > Repository > Locked Files area. There, you can view all existing locks and remove the ones you have permission for.

docs.gitlab.com

File locking - Wikipedia

File locking is a mechanism that restricts access to a computer file by allowing only one user or process to access it in a specific time.

Systems implement locking to prevent the classic interceding update scenario, which is a typical example of race condition, by enforcing the serialization of update processes to any given file. The following example illustrates the interceding update problem:

  1. Process A reads a customer record from a file containing account information, including the customer's account balance and phone number.
  2. Process B now reads the same record from the same file so it has its own copy.
  3. Process A changes the account balance in its copy of the customer record and writes the record back to the file.
  4. Process B, which still has the original stale value for the account balance in its copy of the customer record, updates the account balance and writes the customer record back to the file.
  5. Process B has now written its stale account-balance value to the file, causing the changes made by process A to be lost.

Most operating systems support the concept of record locking, which means that individual records within any given file may be locked, thereby increasing the number of concurrent update processes. Database maintenance uses file locking, whereby it can serialize access to the entire physical file underlying a database. Although this does prevent any other process from accessing the file, it can be more efficient than individually locking a large number of regions in the file by removing the overhead of acquiring and releasing each lock.

Poor use of file locks, like any computer lock, can result in poor performance or in deadlocks. File locking may also refer to additional security applied by a computer user either by using Windows security, NTFS permissions or by installing a third party file locking software.

In mainframes[edit]

IBM pioneered file locking in 1963 for use in mainframe computers using OS/360, where it was termed "exclusive control".

In Microsoft Windows[edit]

Microsoft Windows uses three distinct mechanisms to manage access to shared files:

  1. using share-access controls that allow applications to specify whole-file access-sharing for read, write, or delete
  2. using byte-range locks to arbitrate read and write access to regions within a single file
  3. by Windows file systems disallowing executing files from being opened for write or delete access

Windows inherits the semantics of share-access controls from the MS-DOS system, where sharing was introduced in MS–DOS 3.3. Thus, an application must explicitly allow sharing; otherwise an application has exclusive read, write, and delete access to the file (other types of access, such as those to retrieve the attributes of a file are allowed.)

For a file with shared access, applications may then use byte-range locking to control access to specific regions of the file. Such byte-range locks specify a region of the file (offset and length) and the type of lock (shared or exclusive). Note that the region of the file being locked is not required to have data within the file, and applications sometimes exploit this ability to implement their functionality.

For applications that use the file read/write APIs in Windows, byte-range locks are enforced (also referred to as mandatory locks) by the file systems that execute within Windows. For applications that use the file mapping APIs in Windows, byte-range locks are not enforced (also referred to as advisory locks.) Byte-range locking may also have other side-effects on the Windows system. For example, the Windows file-sharing mechanism will typically disable client side caching of a file for all clients when byte-range locks are used on any client to control file access. The client will observe slower access because read and write operations must be sent to the server where the file is stored.

Improper error-handling in an application program can lead to a scenario where a file is locked (either using "share" access or with byte-range file locking) and cannot be accessed by other applications. If so, the user may be able to restore file access by manually terminating the malfunctioning program. This is typically done through the Task Manager utility.

The sharing mode parameter in the CreateFile function used to open files determines file-sharing. Files can be opened to allow sharing the file for read, write, or delete access. Subsequent attempts to open the file must be compatible with all previously granted sharing-access to the file. When the file is closed, sharing-access restrictions are adjusted to remove the restrictions imposed by that specific file open.

Byte-range locking type is determined by the dwFlags parameter in the LockFileEx function used to lock a region of a file. The Windows API function LockFile can also be used and acquires an exclusive lock on the region of the file.

Any file that is executing on the computer system as a program (e.g., an EXE, COM, DLL, CPL or other binary program file format) is normally prevented by the file system from being opened for write or delete access, reporting a sharing violation, despite the fact that the program is not opened by any application. However, some access is still allowed. For example, a running application file can be renamed or copied (read) even when executing.

Files are accessed by applications in Windows by using file handles. These file handles can be explored with the Process Explorer utility. This utility can also be used to force-close handles without needing to terminate the application holding them. This can cause an undefined behavior, since the program will receive an unexpected error when using the force-closed handle and may even operate on an unexpected file since the handle number may be recycled.

Microsoft Windows XP and Server 2003 editions have introduced volume snapshot (VSS) capability to NTFS, allowing open files to be accessed by backup software despite any exclusive locks. However, unless software is rewritten to specifically support this feature, the snapshot will be crash consistent only, while properly supported applications can assist the operating system in creating "transactionally consistent" snapshots. Other commercial software for accessing locked files under Windows include File Access Manager and Open File Manager. These work by installing their own drivers to access the files in kernel mode.

In Unix-like systems[edit]

Unix-like operating systems (including Linux and Apple's macOS) do not normally automatically lock open files. Several kinds of file-locking mechanisms are available in different flavors of Unix, and many operating systems support more than one kind for compatibility. The two most common mechanisms are fcntl and flock(2). A third such mechanism is lockf(3), which may be separate or may be implemented using either of the first two primitives. Although some types of locks can be configured to be mandatory, file locks under Unix are by default advisory. This means that cooperating processes may use locks to coordinate access to a file among themselves, but uncooperative processes are also free to ignore locks and access the file in any way they choose. In other words, file locks lock out other file lockers only, not I/O.

Two kinds of locks are offered: shared locks and exclusive locks. In the case of fcntl, different kinds of locks may be applied to different sections (byte ranges) of a file, or else to the whole file. Shared locks can be held by multiple processes at the same time, but an exclusive lock can only be held by one process, and cannot coexist with a shared lock. To acquire a shared lock, a process must wait until no processes hold any exclusive locks. To acquire an exclusive lock, a process must wait until no processes hold either kind of lock. Unlike locks created by fcntl, those created by flock are preserved across forks, making them useful in forking servers. It is therefore possible for more than one process to hold an exclusive lock on the same file, provided these processes share a filial relationship and the exclusive lock was initially created in a single process before being duplicated across a fork.

Shared locks are sometimes called "read locks" and exclusive locks are sometimes called "write locks". However, because locks on Unix are advisory, this isn't enforced. Thus it is possible for a database to have a concept of "shared writes" vs. "exclusive writes"; for example, changing a field in place may be permitted under shared access, whereas garbage-collecting and rewriting the database may require exclusive access.

File locks apply to the actual file, rather than the file name. This is important since Unix allows multiple names to refer to the same file. Together with non-mandatory locking, this leads to great flexibility in accessing files from multiple processes. On the other hand, the cooperative locking approach can lead to problems when a process writes to a file without obeying file locks set by other processes.

For this reason, some Unix-like operating systems also offer limited support for mandatory locking.[1] On such systems, a file whose setgid bit is on but whose group execution bit is off when that file is opened will be subject to automatic mandatory locking if the underlying filesystem supports it. However, non-local NFS partitions tend to disregard this bit.[2] This is an exception to the earlier statement that Unix does not automatically lock open files. This strategy first originated in System V, and can be seen today in the Solaris, HP-UX, and Linux operating systems. It is not part of POSIX, however, and BSD-derived operating systems like FreeBSD, OpenBSD, NetBSD, and Apple's macOS do not support it.[3] Linux also supports mandatory locking through the special "mount(8) -o mand" parameter for filesystem mounting, but this is rarely used.

Some Unix-like operating systems prevent attempts to open the executable file of a running program for writing; this is a third form of locking, separate from those provided by fcntl and flock.

Problems[edit]

Both flock and fcntl have quirks that occasionally puzzle programmers more familiar with other operating systems.[citation needed]

More than one process can hold an exclusive flock on a given file if the exclusive lock was duplicated across a later fork. This simplifies coding for network servers and helps prevent race conditions, but can be confusing to the unaware.

Mandatory locks have no effect on the unlink system call. Consequently, certain programs may, effectively, circumvent mandatory locking. The authors of Advanced Programming in the UNIX Environment (Second Edition) observed that the ed editor did that indeed (page 456).

Whether and how flock locks work on network filesystems, such as NFS, is implementation dependent. On BSD systems, flock calls on a file descriptor open to a file on an NFS-mounted partition are successful no-ops. On Linux prior to 2.6.12, flock calls on NFS files would act only locally. Kernel 2.6.12 and above implement flock calls on NFS files using POSIX byte-range locks. These locks will be visible to other NFS clients that implement fcntl-style POSIX locks, but invisible to those that do not.[4]

Lock upgrades and downgrades release the old lock before applying the new lock. If an application downgrades an exclusive lock to a shared lock while another application is blocked waiting for an exclusive lock, the latter application may get the exclusive lock and lock the first application out. This means that lock downgrades can block, which may be counterintuitive.

All fcntl locks associated with a file for a given process are removed when any file descriptor for that file is closed by that process, even if a lock was never requested for that file descriptor. Also, fcntl locks are not inherited by a child process. The fcntl close semantics are particularly troublesome for applications that call subroutine libraries that may access files. Neither of these "bugs" occurs using real flock-style locks.

Preservation of the lock status on open file descriptors passed to another process using a Unix domain socket is implementation dependent.

AFS and buffered I/O Problems[edit]

The Andrew File System (AFS) presents an interesting case where file locking fails. If an AFS file is accessible from several different machines simultaneously, then a lock obtained on one machine isn't known to another machine. Therefore, two (or more) users on different machines can lock the same file for exclusive use, and each believes their read/write operations are being done by only their machine, when in fact, both can be writing to the same section of the same file. Therefore, "flock" or "fcntl" fails to actually lock exclusively across machines. The locks are successful on any single machine, therefore the only practical way to deal with simultaneous exclusive write access is to have all users login to the same machine. This can be controlled by requiring access programs or scripts that check that the user is on a specific host.

Another source of lock failure occurs when buffered I/O has buffers assigned in the user's local workspace, rather than in an operating system buffer pool. "fread" and "fwrite" are commonly used to do buffered I/O, and once a section of a file is read, another attempt to read that same section will, most likely, obtain the data from the local buffer. The problem is another user attached to the same file has their own local buffers, and the same thing is happening for them. "fwrite" of data obtained from the buffer by "fread" will NOT be obtaining the data from the file itself, and some other user could have changed it. Both could use "flock" for exclusive access, which prevents simultaneous writes, but since the reads are reading from the buffer and not the file itself, any data changed by user #1 can be lost by user #2 (overwritten). The best solution to this problem is to use unbuffered I/O ("read" and "write") with "flock", which also means using "lseek" instead of "fseek" and "ftell". Of course, you'll have to make adjustments for function parameters and results returned. Generally speaking, buffered I/O is unsafe when used with shared files.

In Amiga OS[edit]

In Amiga OS, a lock on a file (or directory) can be acquired using the Lock function (in the dos.library). A lock can be shared (other processes can read the file/directory, but can't modify or delete it), or exclusive so that only the process which successfully acquires the lock can access or modify the object. The lock is on the whole object and not part of it. The lock must be released with the UnLock function: unlike in Unix, the operating system does not implicitly unlock the object when the process terminates.

Lock files[edit]

Shell scripts and other programs often use a strategy similar to the use of file locking: creation of lock files, which are files whose contents are irrelevant (although often one will find the process identifier of the holder of the lock in the file) and whose sole purpose is to signal by their presence that some resource is locked. A lock file is often the best approach if the resource to be controlled is not a regular file at all, so using methods for locking files does not apply. For example, a lock file might govern access to a set of related resources, such as several different files, directories, a group of disk partitions, or selected access to higher level protocols like servers or database connections.

When using lock files, care must be taken to ensure that operations are atomic. To obtain a lock, the process must verify that the lock file does not exist and then create it, whilst preventing another process from creating it in the meantime. Various methods to do this include:

  • Using the lockfile command (a conditional semaphore-file creator distributed in the procmail package).
  • System calls that create a file, but fail if the file already exists. (System calls are available from languages such as C or C++, and shell scripts can make use of noclobber)
  • Using the mkdir command and checking the exit code for failure[5]

Lock files are often named with a tilde (~) prefixed to the name of the file they are locking. If they are locking a resource other than a file, they may be named more arbitrarily.

Certain Mozilla products (such as Firefox, Thunderbird, Sunbird) use this type of file resource lock mechanism (using a temporary file named "parent.lock".)

Unlocker software[edit]

An unlocker is a utility used to determine what process is locking a file, and displays a list of processes as well as choices on what to do with the process (kill task, unlock, etc.) along with a list of file options such as delete or rename. On some Unix-like systems, utilities such as fstat and lockf can be used to inspect the state of file locks by process, by filename, or both.[citation needed]

On Windows systems, if a file is locked, it's possible to schedule its moving or deletion to be performed on the next reboot. This approach is typically used by installers to replace locked system files.

Version control systems[edit]

In version control systems file locking is used to prevent two users changing the same file version in parallel and then when saving, the second user to overwrite what first user changed. This is implemented by marking locked files as read-only in the file system. A user wanting to change the file performs an unlock (also called checkout) operation, and until a check-in (store) operation is done, or the lock is reverted, nobody else is allowed to unlock the file.

See also[edit]

References[edit]

External links[edit]

en.wikipedia.org

Скачать file lock

Скачать file lock Найти результаты для Mac, для Ubuntu, для Android, для iPhone

Защитите и скройте ваши файлы от глаз других пользователей

...встроенными средствами для защиты информации, но эти средства не всегда оправдывают ожидания. File Lock - инструмент, благодаря которому пользователи смогут легко защитить и скрыть свои файлы. Программа потребляет мало...

7.0.1

FileLock - приложение, разработанное компанией Kalyan. На сайте доступна последняя версия 2.0. Лицензия - . Размер файла - 0. Переведено на .

2.0

File Locker - приложение, разработанное компанией Secure Systems Software. На сайте доступна последняя версия 1.1. Лицензия - . Размер файла - 0. Переведено на .

1.1

Загружайте файлы на Rapidshare и другие файлообменники

Существует огромное количество менеджеров закачек, помогающих вам скачивать файлы с различных файлообменных сервисов. В случае с менеджерами загрузок файлов в интернет дела обстоят совсем иначе, так как их количество...

6.2.5

Заблокируйте папки для обеспечения приватности

...Вашим компьютером пользуется много людей? Если да, то вы можете использовать Folder Lock, так как он позволяет заблокировать папки, доступ к которым вы хотите исключить. Благодаря Folder Lock вы сможете решить, какие...

7.6.5

Express Zip File Compression - приложение, разработанное компанией NCH Software. На сайте доступна последняя версия 3.03. Лицензия - . Размер файла - 0. Переведено на .

3.03

Мультиформатный конвертер видео

Prism Video File Converter – это инструмент для конвертации видео, созданный NCH Software. Он способен работать с широким набором видео форматов: AVI, MPG, VOB, ASF, WMV, MP4 или OGM; а на выходе предлагаются такие...

2.66

File & Folder Unlocker - приложение, разработанное компанией Diamond Computer Systems. На сайте доступна последняя версия 1.0. Лицензия - . Размер файла - 0. Переведено на .

1.0

Cobra File Defrag - приложение, разработанное компанией Cobra Apps. На сайте доступна последняя версия 2.1. Лицензия - . Размер файла - 0. Переведено на .

2.1

FCorp - File & Folder Tools - приложение, разработанное компанией Fahmy Corporation. На сайте доступна последняя версия 2016.8. Лицензия - . Размер файла - 0. Переведено на .

2016.8

FCorp - File/Folder Launcher - приложение, разработанное компанией Fahmy Corporation. На сайте доступна последняя версия 2016.8. Лицензия - . Размер файла - 0. Переведено на .

2016.8

Изменение даты создания и даты последнего редактирования файла

File Date Changer – простой инструмент, позволяющий изменять дату создания и дату последнего редактирования файлов. Программа позволяет изменить дату как одного файла, так и всех файлов внутри папки программы. File...

3.0.4

Bamboo File Sync - приложение, разработанное компанией Haxar. На сайте доступна последняя версия 3.5. Лицензия - . Размер файла - 0. Переведено на .

3.5

Effective File Search - приложение, разработанное компанией SOW. На сайте доступна последняя версия 6.8.1. Лицензия - . Размер файла - 0. Переведено на .

6.8.1

Управляйте файлами на вашем iPad или iPhone

iPad File Explorer позволяет управлять всеми файлами, приложениями и папками на вашем iPad, iPhone или iPod Touch так, как если бы вы работали с флешкой. Чтобы воспользоваться этой программой, вам нужно сначала просто...

4.10

Эффективное восстановление удаленных файлов

File Scavenger - это одна из лучших программ для восстановления удаленных файлов. Вы сможете найти удаленный файлы по типу, то есть вы сможете искать файлы любого вида, которые есть на вашем компьютере. То есть, если...

4.3

Uptodown is currently under maintenance. We'll be back soon.

ru.uptodown.com

Download file lock

Download file lock Find results for Mac, for Ubuntu, for Android, for iPhone

Protect and hide your files from the view of others

...are options for protection in the operating system itself, but these options sometimes fall short. File Lock is a tool for the protection and concealment of simple files. It consumes few resources and its main purpose...

7.0.1

Block access to your private files and documents

...FileLock is a simple tool with which you can improve the security of your private files, protecting them with password encryption. In a matter of seconds, you can prevent others from accessing your documents, or...

2.0

Keep your files safe from prying eyyes

...such as that presentation or that school project, have to be more protected than other ones. File Locker will prevent your files from being Renamed, Edited, Deleted or Moved without your consent. That way, no virus or...

1.1

Correct all the information of your Window files

File Date Corrector is a very useful tool that helps you modify all those tiny errors that are generated inside Windows elements and that can't be changed manually. If you've taken pictures and the date stamp is wrong,...

1.31

Manage shortcuts for files, folders, and programs

FCorp - File/Folder Launcher is a Windows operating system tool to give you access to your most frequently used files, folders, and applications fast and easily – without having to fill your desktop with shortcuts that...

2016.8

Manage your folders in the best way

FCorp - File & Folder Tools is a super useful tool that helps you organize all your folders in a totally customized way so you can organize your computer in the best way possible. The app lets you modify any essential...

2016.8

RS File Recovery is a tool that's intended for recovering all kinds of lost files, no matter what kind they are, and avoid losing them completely. Despite the fact that not all files can be recovered (the final result...

3.8

Change a file's creation and edit dates

File Date Changer is a simple tool that allows you to change both the creation date and the last modified date of a file. You can select as many files or folders as you want, and modify the date of just one image, or...

3.0.4

A secure filing cabinet for your most important docs

...Folder Lock is a practical tool providing a secure location to store any files that need extra safety. The documents you include in the program's directory get protected so that you're the only person who can protect...

7.6.5

Make continual backups of your files

Live File Backup is an app that makes security copies of your files and documents in real time. The program takes charge of backing up your files continuously and automatically, updating your files each time you make...

2.38

Compress all of your important files in seconds

Express Zip File Compression is a tool that enables you to simply and easily archive, compress, manage, or extract files and folders. Thanks to this application, you can save hard drive space and file data by...

3.03

Eliminate those files that resist being deleted

...the files that you want to delete are being used by an active process within your system. File & Folder Unlocker is a free, portable tool that will help you solve this problem by giving you complete and total control...

1.0

Get rid of duplicate files and save space

Sometimes, your system may create duplicated files that don't only take up space on your disk drive, but can also create some unnecessary confusion. Auslogics Duplicate File Finder finds all of these doubles and gives...

6.2.0.1

A tool for recovering broken images

If you're having trouble opening corrupt images and you're worried about how to access your favorite memories, RS File Repair is a tool that can recover them in a quick and easy way, helping you restore all the photos...

1.1

Defragment files and folders to make your computer run smoothly

Cobra File Defrag is a good application if you want to make your computer run better. You'll reach that goal by defragmenting folders or the whole disk. One of the main advantages of Cobra File Defrag is that it...

2.1

Analyze, detect and delete any autorun file

Autorun apps are those that are automatically launched from USB flash drives or from CDs, which allow these devices to start up when inserted into your PC. Lots of viruses and malware take advantage of this to spread...

1.5

Uptodown is currently under maintenance. We'll be back soon.

en.uptodown.com

Как открыть LOCK файлы - Файлы с расширением LOCK

Что обозначает расширение LOCK?

автор: Jay Geater, главный писатель по вопросам технологий

Вам кто-то послал по электронной почте файл LOCK, и вы не знаете, как его открыть? Может быть, вы нашли файл LOCK на вашем компьютере и вас заинтересовало, что это за файл? Windows может сказать вам, что вы не можете открыть его, или, в худшем случае, вы можете столкнуться с соответствующим сообщением об ошибке, связанным с файлом LOCK.

До того, как вы сможете открыть файл LOCK, вам необходимо выяснить, к какому виду файла относится расширения файла LOCK.

Совет: Неправильные ассоциации файлов LOCK могут являться признаком других базовых проблем в вашей операционной системе Windows. Эти неверные записи могут также стать причиной иных сопутствующих проблем, таких как медленный запуск Windows, зависание компьютера и прочих проблем производительности ПК. Поэтому мы настоятельно рекомендуем вам просканировать свой реестр Windows на предмет неправильных ассоциаций файлов и других проблем, связанных с фрагментацией реестра.

Ответ:

Файлы LOCK имеют Разные файлы, который преимущественно ассоциирован с .NET Framework Database Lock File (Microsoft Corporation).

Иные типы файлов также могут использовать расширение файла LOCK. Если вам известны любые другие форматы файлов, использующие расширение файла LOCK, пожалуйста, свяжитесь с нами, чтобы мы смогли соответствующим образом обновить нашу информацию.

Как открыть ваш файл LOCK:

Самый быстрый и легкий способ открыть свой файл LOCK — это два раза щелкнуть по нему мышью. В данном случае система Windows сама выберет необходимую программу для открытия вашего файла LOCK.

В случае, если ваш файл LOCK не открывается, весьма вероятно, что на вашем ПК не установлена необходимая прикладная программа для просмотра или редактирования файлов с расширениями LOCK.

Если ваш ПК открывает файл LOCK, но в неверной программе, вам потребуется изменить настройки ассоциации файлов в вашем реестре Windows. Другими словами, Windows ассоциирует расширения файлов LOCK с неверной программой.

Мы настоятельно рекомендуем просканировать ваш реестр Windows на предмет неверных ассоциаций файлов и прочих проблем, связанных с реестром.

Загрузки программного обеспечения, связанные с расширением файла LOCK:

* Некоторые форматы расширений файлов LOCK можно открыть только в двоичном формате.

Скачать FileViewPro для открытия ваших файлов LOCK прямо сейчас

LOCK Инструмент анализа файлов™

Вы не уверены, какой тип у файла LOCK? Хотите получить точную информацию о файле, его создателе и как его можно открыть?

Теперь можно мгновенно получить всю необходимую информацию о файле LOCK!

Революционный LOCK Инструмент анализа файлов™ сканирует, анализирует и сообщает подробную информацию о файле LOCK. Наш алгоритм (ожидается выдача патента) быстро проанализирует файл и через несколько секунд предоставит подробную информацию в наглядном и легко читаемом формате.†

Уже через несколько секунд вы точно узнаете тип вашего файла LOCK, приложение, сопоставленное с файлом, имя создавшего файл пользователя, статус защиты файла и другую полезную информацию.

Чтобы начать бесплатный анализ файла, просто перетащите ваш файл LOCK внутрь пунктирной линии ниже или нажмите «Просмотреть мой компьютер» и выберите файл. Отчет об анализе файла LOCK будет показан внизу, прямо в окне браузера.

Ваш файл анализируется... пожалуйста подождите.

Имя файла:

Размер файла:

Прервать

† Инструмент анализа файлов LOCK использует компоненты стороннего программного обеспечения. Нажмите здесь, чтобы прочитать правовую оговорку.

Об авторе: Джей Гитер (Jay Geater) является президентом и генеральным директором корпорации Solvusoft — глобальной компании, занимающейся программным обеспечением и уделяющей основное внимание новаторским сервисным программам. Он всю жизнь страстно увлекался компьютерами и любит все, связанное с компьютерами, программным обеспечением и новыми технологиями.

www.solvusoft.com

lockfile — Platform-independent file locking — lockfile 0.9.1 documentation

Note

This package is pre-release software. Between versions 0.8 and 0.9 it was changed from a module to a package. It is quite possible that the API and implementation will change again in important ways as people test it and provide feedback and bug fixes. In particular, if the mkdir-based locking scheme is sufficient for both Windows and Unix platforms, the link-based scheme may be deleted so that only a single locking scheme is used, providing cross-platform lockfile cooperation.

Note

The implementation uses the with statement, both in the tests and in the main code, so will only work out-of-the-box with Python 2.5 or later. However, the use of the with statement is minimal, so if you apply the patch in the included 2.4.diff file you can use it with Python 2.4. It’s possible that it will work in Python 2.3 with that patch applied as well, though the doctest code relies on APIs new in 2.4, so will have to be rewritten somewhat to allow testing on 2.3. As they say, patches welcome. ;-)

The lockfile package exports a LockFile class which provides a simple API for locking files. Unlike the Windows msvcrt.locking() function, the Unix fcntl.flock(), fcntl.lockf() and the deprecated posixfile module, the API is identical across both Unix (including Linux and Mac) and Windows platforms. The lock mechanism relies on the atomic nature of the link() (on Unix) and mkdir() (On Windows) system calls. It also contains several lock-method-specific modules: lockfile.linklockfile, lockfile.mkdirlockfile, and lockfile.sqlitelockfile, each one exporting a single class. For backwards compatibility with versions before 0.9 the LinkFileLock, MkdirFileLock and SQLiteFileLock objects are exposed as attributes of the top-level lockfile package, though this use was deprecated starting with version 0.9 and will be removed in version 1.0.

Note

The current implementation uses os.link() on Unix, but since that function is unavailable on Windows it uses os.mkdir() there. At this point it’s not clear that using the os.mkdir() method would be insufficient on Unix systems. If it proves to be adequate on Unix then the implementation could be simplified and truly cross-platform locking would be possible.

Note

The current implementation doesn’t provide for shared vs. exclusive locks. It should be possible for multiple reader processes to hold the lock at the same time.

The module defines the following exceptions:

exception lockfile.Error

This is the base class for all exceptions raised by the LockFile class.

exception lockfile.LockError

This is the base class for all exceptions raised when attempting to lock a file.

exception lockfile.UnlockError

This is the base class for all exceptions raised when attempting to unlock a file.

exception lockfile.LockTimeout

This exception is raised if the LockFile.acquire() method is called with a timeout which expires before an existing lock is released.

exception lockfile.AlreadyLocked

This exception is raised if the LockFile.acquire() detects a file is already locked when in non-blocking mode.

exception lockfile.LockFailed

This exception is raised if the LockFile.acquire() detects some other condition (such as a non-writable directory) which prevents it from creating its lock file.

exception lockfile.NotLocked

This exception is raised if the file is not locked when LockFile.release() is called.

exception lockfile.NotMyLock

This exception is raised if the file is locked by another thread or process when LockFile.release() is called.

The following classes are provided:

class linklockfile.LinkLockFile(path, threaded=True)

This class uses the link(2)() system call as the basic lock mechanism. path is an object in the file system to be locked. It need not exist, but its directory must exist and be writable at the time the acquire() and release() methods are called. threaded is optional, but when set to True locks will be distinguished between threads in the same process.

class symlinklockfile.SymlinkLockFile(path, threaded=True)

This class uses the symlink(2)() system call as the basic lock mechanism. The parameters have the same meaning and constraints as for the LinkLockFile class.

class mkdirlockfile.MkdirLockFile(path, threaded=True)

This class uses the mkdir(2)() system call as the basic lock mechanism. The parameters have the same meaning and constraints as for the LinkLockFile class.

class sqlitelockfile.SQLiteLockFile(path, threaded=True)

This class uses the sqlite3 module to implement the lock mechanism. The parameters have the same meaning as for the LinkLockFile class.

class lockfile.LockBase(path, threaded=True)

This is the base class for all concrete implementations and is available at the lockfile package level so programmers can implement other locking schemes.

lockfile.locked(path, timeout=None)

This function provides a decorator which insures the decorated function is always called with the lock held.

By default, the LockFile object refers to the mkdirlockfile.MkdirLockFile class on Windows. On all other platforms it refers to the linklockfile.LinkLockFile class.

When locking a file the linklockfile.LinkLockFile class creates a uniquely named hard link to an empty lock file. That hard link contains the hostname, process id, and if locks between threads are distinguished, the thread identifier. For example, if you want to lock access to a file named “README”, the lock file is named “README.lock”. With per-thread locks enabled the hard link is named HOSTNAME-THREADID-PID. With only per-process locks enabled the hard link is named HOSTNAME–PID.

When using the mkdirlockfile.MkdirLockFile class the lock file is a directory. Referring to the example above, README.lock will be a directory and HOSTNAME-THREADID-PID will be an empty file within that directory.

See also

Module msvcrt Provides the locking() function, the standard Windows way of locking (parts of) a file. Module posixfile The deprecated (since Python 1.5) way of locking files on Posix systems. Module fcntl Provides the current best way to lock files on Unix systems (lockf() and flock()).

LockFile Objects

LockFile objects support the context manager protocol used by the statement:with statement. The timeout option is not supported when used in this fashion. While support for timeouts could be implemented, there is no support for handling the eventual Timeout exceptions raised by the __enter__() method, so you would have to protect the with statement with a try statement. The resulting construct would not be any simpler than just using a try statement in the first place.

LockFile has the following user-visible methods:

LockFile.acquire(timeout=None)

Lock the file associated with the LockFile object. If the timeout is omitted or None the caller will block until the file is unlocked by the object currently holding the lock. If the timeout is zero or a negative number the AlreadyLocked exception will be raised if the file is currently locked by another process or thread. If the timeout is positive, the caller will block for that many seconds waiting for the lock to be released. If the lock is not released within that period the LockTimeout exception will be raised.

LockFile.release()

Unlock the file associated with the LockFile object. If the file is not currently locked, the NotLocked exception is raised. If the file is locked by another thread or process the NotMyLock exception is raised.

lockfile.is_locked()

Return the status of the lock on the current file. If any process or thread (including the current one) is locking the file, True is returned, otherwise False is returned.

lockfile.break_lock()

If the file is currently locked, break it.

lockfile.i_am_locking()

Returns true if the caller holds the lock.

Examples

This example is the “hello world” for the lockfile package:

from lockfile import LockFile lock = LockFile("/some/file/or/other") with lock: print lock.path, 'is locked.'

To use this with Python 2.4, you can execute:

from lockfile import LockFile lock = LockFile("/some/file/or/other") lock.acquire() print lock.path, 'is locked.' lock.release()

If you don’t want to wait forever, you might try:

from lockfile import LockFile lock = LockFile("/some/file/or/other") while not lock.i_am_locking(): try: lock.acquire(timeout=60) # wait up to 60 seconds except LockTimeout: lock.break_lock() lock.acquire() print "I locked", lock.path lock.release()

You can also insure that a lock is always held when appropriately decorated functions are called:

from lockfile import locked @locked("/tmp/mylock") def func(a, b): return a + b

Other Libraries

The idea of implementing advisory locking with a standard API is not new with lockfile. There are a number of other libraries available:

pythonhosted.org


Смотрите также